From a1b2b4c5b691dcafc2abbefbbcae205b7159daf6 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Fri, 23 Mar 2018 21:25:04 +0100 Subject: [PATCH] swarm/storage: fixed comment and improved error. cleandb no longer exists --- swarm/storage/ldbstore.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swarm/storage/ldbstore.go b/swarm/storage/ldbstore.go index e79d0f918a..e60b0fc522 100644 --- a/swarm/storage/ldbstore.go +++ b/swarm/storage/ldbstore.go @@ -662,7 +662,7 @@ func (s *LDBStore) tryAccessIdx(ikey []byte, index *dpaDBIndex) bool { } func (s *LDBStore) Get(key Key) (chunk *Chunk, err error) { - //log.Trace("ldbstore.get", "key", chunk.Key) - seems like chunk is nil sometimes + log.Trace("ldbstore.get", "key", key) s.lock.Lock() defer s.lock.Unlock() return s.get(key) @@ -700,9 +700,9 @@ func (s *LDBStore) get(key Key) (chunk *Chunk, err error) { hash := hasher.Sum(nil) if !bytes.Equal(hash, key) { - log.Error(fmt.Sprintf("Apparent key/hash mismatch. Hash %x, key %v", hash, key[:])) + log.Error("apparent key/hash mismatch", "hash", hash, "key", key[:]) s.delete(indx.Idx, getIndexKey(key), s.po(key)) - log.Error("Invalid Chunk in Database. Please repair with command: 'swarm cleandb'") + log.Error("invalid chunk in database.") } }