Skip to content

Commit

Permalink
fix: fast node can not recover from force kill or panic (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
unclezoro authored Jul 25, 2022
1 parent 9d59a14 commit 0ed265c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/blockchain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 0ed265c

Please sign in to comment.