Skip to content

Commit

Permalink
fix: skip HasState check for fast node (bnb-chain#1901)
Browse files Browse the repository at this point in the history
  • Loading branch information
brilliant-lx authored Sep 28, 2023
1 parent 35b21ca commit 4b45c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
}
// Make sure the state associated with the block is available
head := bc.CurrentBlock()
if !bc.HasState(head.Root) {
if !bc.stateCache.NoTries() && !bc.HasState(head.Root) {
// Head state is missing, before the state recovery, find out the
// disk layer point of snapshot(if it's enabled). Make sure the
// rewound point is lower than disk layer.
Expand Down

0 comments on commit 4b45c59

Please sign in to comment.