swarm/storage: remove unused methods from Chunk interface (#18283)

This commit is contained in:
Javier Peletier
2018-12-18 15:25:02 +01:00
committed by Anton Evangelatov
parent b01cfce362
commit fe86a707d8
3 changed files with 4 additions and 21 deletions

View File

@ -179,8 +179,9 @@ func testStoreCorrect(m ChunkStore, n int, chunksize int64, t *testing.T) {
return fmt.Errorf("key does not match retrieved chunk Address")
}
hasher := MakeHashFunc(DefaultHash)()
hasher.ResetWithLength(chunk.SpanBytes())
hasher.Write(chunk.Payload())
data := chunk.Data()
hasher.ResetWithLength(data[:8])
hasher.Write(data[8:])
exp := hasher.Sum(nil)
if !bytes.Equal(h, exp) {
return fmt.Errorf("key is not hash of chunk data")