fix: repeated cmd error

This commit is contained in:
joeycli 2024-08-19 15:11:27 +08:00
parent aa9d5182c1
commit ef3f9dfaa7
2 changed files with 9 additions and 2 deletions

@ -301,7 +301,7 @@ of ancientStore, will also displays the reserved number of blocks in ancientStor
}
getHashDBState = &cli.Command{
Action: getDebugHashState,
Name: "get-debug-version-state",
Name: "get-debug-hash-state",
Flags: []cli.Flag{
utils.HashStateDirFlag,
utils.BlockNumber,

@ -2244,7 +2244,14 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
bc.stateCache.SetVersion(int64(block.NumberU64()))
statedb, err := state.NewWithSharedPool(parent.Root, bc.stateCache, bc.snaps)
defer bc.stateCache.Release()
defer func() {
bc.stateCache.Release()
if bc.stateCache.Scheme() != rawdb.VersionScheme {
if block.NumberU64() == 2000000 {
log.Crit("exit.... path mode, 200w blocks")
}
}
}()
if err != nil {
return it.index, err
}