(sampleIdx uint64)
| 216 | } |
| 217 | |
| 218 | func (ds *DataShard) ReadSample(sampleIdx uint64) (common.Hash, error) { |
| 219 | |
| 220 | for _, df := range ds.dataFiles { |
| 221 | if df.ContainsSample(sampleIdx) { |
| 222 | return df.ReadSample(sampleIdx) |
| 223 | } |
| 224 | } |
| 225 | return common.Hash{}, fmt.Errorf("chunk not found: the shard is not completed?") |
| 226 | } |
| 227 | |
| 228 | func CalcEncodeKey(commit common.Hash, chunkIdx uint64, miner common.Address) common.Hash { |
| 229 | return calcEncodeKey(commit, chunkIdx, miner) |
nothing calls this directly
no test coverage detected