fix: fast node can not recover from force kill or panic (#1014)
This commit is contained in:
parent
9d59a140d6
commit
0ed265c5e0
@ -258,6 +258,9 @@ func (bc *BlockChain) GetTd(hash common.Hash, number uint64) *big.Int {
|
||||
|
||||
// HasState checks if state trie is fully present in the database or not.
|
||||
func (bc *BlockChain) HasState(hash common.Hash) bool {
|
||||
if bc.stateCache.NoTries() {
|
||||
return bc.snaps != nil && bc.snaps.Snapshot(hash) != nil
|
||||
}
|
||||
if bc.pipeCommit && bc.snaps != nil {
|
||||
// If parent snap is pending on verification, treat it as state exist
|
||||
if s := bc.snaps.Snapshot(hash); s != nil && !s.Verified() {
|
||||
|
Loading…
Reference in New Issue
Block a user