Delete current chain for reset

pull/229/merge
obscuren 10 years ago
parent e2e3fa3d11
commit 1382e8d84b
  1. 4
      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)

Loading…
Cancel
Save