mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-23 11:57:17 +00:00
Delete current chain for reset
This commit is contained in:
parent
e2e3fa3d11
commit
1382e8d84b
@ -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…
Reference in New Issue
Block a user