diff options
author | Viktor TrĂ³n <viktor.tron@gmail.com> | 2017-02-13 20:20:50 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-02-13 20:20:50 +0800 |
commit | e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd (patch) | |
tree | edbe1cd7381c69deae9b31df527d6ce1c6c664b3 /swarm/storage/memstore.go | |
parent | 65ed6a9def4d23bbe6109ae4b841a56510d0c476 (diff) | |
download | go-tangerine-e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd.tar go-tangerine-e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd.tar.gz go-tangerine-e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd.tar.bz2 go-tangerine-e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd.tar.lz go-tangerine-e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd.tar.xz go-tangerine-e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd.tar.zst go-tangerine-e23e86921b55cb1ee2fca6b6fb9ed91f5532f9fd.zip |
swarm/network: fix chunk integrity checks (#3665)
* swarm/network: integrity on incoming known chunks
* swarm/network: fix integrity check for incoming chunks
* swarm/storage: imrpoved integrity checking on chunks
* dbstore panics on corrupt chunk entry an prompts user to run cleandb
* memstore adds logging for garbage collection
* dbstore refactor item delete. correct partial deletes in Get
* cmd/swarm: added cleandb subcommand
Diffstat (limited to 'swarm/storage/memstore.go')
-rw-r--r-- | swarm/storage/memstore.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/swarm/storage/memstore.go b/swarm/storage/memstore.go index e55abb45f..7903d33e7 100644 --- a/swarm/storage/memstore.go +++ b/swarm/storage/memstore.go @@ -20,6 +20,9 @@ package storage import ( "sync" + + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" ) const ( @@ -284,7 +287,11 @@ func (s *MemStore) removeOldest() { } if node.entry.dbStored != nil { + glog.V(logger.Detail).Infof("Memstore Clean: Waiting for chunk %v to be saved", node.entry.Key.Log()) <-node.entry.dbStored + glog.V(logger.Detail).Infof("Memstore Clean: Chunk %v saved to DBStore. Ready to clear from mem.", node.entry.Key.Log()) + } else { + glog.V(logger.Detail).Infof("Memstore Clean: Chunk %v already in DB. Ready to delete.", node.entry.Key.Log()) } if node.entry.SData != nil { |