(ctx context.Context, contract common.Address, kvIdxes []uint64)
| 110 | } |
| 111 | |
| 112 | func (m *l1MiningAPI) GetDataHashes(ctx context.Context, contract common.Address, kvIdxes []uint64) ([]common.Hash, error) { |
| 113 | metas, err := m.GetKvMetas(kvIdxes, rpc.LatestBlockNumber.Int64()) |
| 114 | if err != nil { |
| 115 | m.lg.Error("Failed to get versioned hashes", "error", err) |
| 116 | return nil, err |
| 117 | } |
| 118 | var hashes []common.Hash |
| 119 | for i := 0; i < len(metas); i++ { |
| 120 | var dhash common.Hash |
| 121 | copy(dhash[:], metas[i][32-ethstorage.HashSizeInContract:32]) |
| 122 | m.lg.Info("Get data hash", "kvIndex", kvIdxes[i], "hash", dhash.Hex()) |
| 123 | hashes = append(hashes, dhash) |
| 124 | } |
| 125 | return hashes, nil |
| 126 | } |
| 127 | |
| 128 | func (m *l1MiningAPI) SubmitMinedResult(ctx context.Context, contract common.Address, rst result, cfg Config) (common.Hash, error) { |
| 129 | m.lg.Debug("Submit mined result", "shard", rst.startShardId, "block", rst.blockNumber, "nonce", rst.nonce) |
nothing calls this directly
no test coverage detected