aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/dbstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/storage/dbstore.go')
-rw-r--r--swarm/storage/dbstore.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/swarm/storage/dbstore.go b/swarm/storage/dbstore.go
index 5ecc5c500..4ddebb021 100644
--- a/swarm/storage/dbstore.go
+++ b/swarm/storage/dbstore.go
@@ -354,7 +354,7 @@ func (s *DbStore) Get(key Key) (chunk *Chunk, err error) {
hasher := s.hashfunc()
hasher.Write(data)
hash := hasher.Sum(nil)
- if bytes.Compare(hash, key) != 0 {
+ if !bytes.Equal(hash, key) {
s.db.Delete(getDataKey(index.Idx))
err = fmt.Errorf("invalid chunk. hash=%x, key=%v", hash, key[:])
return