aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/common_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/storage/common_test.go')
-rw-r--r--swarm/storage/common_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/swarm/storage/common_test.go b/swarm/storage/common_test.go
index af104a5ae..bcc29d8cc 100644
--- a/swarm/storage/common_test.go
+++ b/swarm/storage/common_test.go
@@ -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")