From 4e032aeb108afb6ba33f7e84403a4c96b90ef0b6 Mon Sep 17 00:00:00 2001 From: Balint Gabor Date: Fri, 19 Jan 2018 11:17:43 +0100 Subject: [PATCH] swarm/storage: Fix logging of number of written chunks Fixes issue https://github.com/ethersphere/go-ethereum/issues/201 --- swarm/storage/dbstore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swarm/storage/dbstore.go b/swarm/storage/dbstore.go index bed07bdd9b..16c4ecdf50 100644 --- a/swarm/storage/dbstore.go +++ b/swarm/storage/dbstore.go @@ -615,7 +615,7 @@ func (s *DbStore) writeBatch(b *leveldb.Batch, entryCnt, dataIdx, accessCnt uint b.Put(keyEntryCnt, U64ToBytes(entryCnt)) b.Put(keyDataIdx, U64ToBytes(dataIdx)) b.Put(keyAccessCnt, U64ToBytes(accessCnt)) - l := s.batch.Len() + l := b.Len() if err := s.db.Write(b); err != nil { log.Error(fmt.Sprintf("unable to write batch: %v", err)) }