aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/chain_manager.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go
index fe687e501..485c195d5 100644
--- a/core/chain_manager.go
+++ b/core/chain_manager.go
@@ -198,6 +198,10 @@ func (bc *ChainManager) Reset() {
bc.mu.Lock()
defer bc.mu.Unlock()
+ for block := bc.currentBlock; block != nil; block = bc.GetBlock(block.Header().ParentHash) {
+ ethutil.Config.Db.Delete(block.Hash())
+ }
+
// Prepare the genesis block
bc.write(bc.genesisBlock)
bc.insert(bc.genesisBlock)