swarm/storage/localstore: decrement size counter on ModeRemoval update

This commit is contained in:
Janos Guljas 2018-12-03 10:41:21 +01:00
parent 37205de1e1
commit b1ded5a80b

View file

@ -174,6 +174,7 @@ func (db *DB) updateBatch(b *batch, mode Mode, item shed.IndexItem) (err error)
db.retrievalIndex.DeleteInBatch(b.Batch, item)
db.pullIndex.DeleteInBatch(b.Batch, item)
db.gcIndex.DeleteInBatch(b.Batch, item)
db.sizeCounter.DecInBatch(b.Batch)
default:
return ErrInvalidMode