Skip to content

Commit

Permalink
fixup! rewind to last non verified block when restart fast node
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Apr 19, 2022
1 parent 8c6d5a8 commit 1e44aa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/remote_state_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func NewVerifyManager(blockchain *BlockChain, peers verifyPeers, allowInsecure b
numberU64 := number.Uint64()
blockchain.SetHead(numberU64)
block := blockchain.GetBlockByNumber(numberU64)
for i := 0; i < maxForkHeight; i++ {
for i := 0; i < maxForkHeight && block.NumberU64() > 0; i++ {
// When inserting a block,
// the block before 11 blocks will be verified,
// so the parent block of 11-22 will directly write the verification information.
Expand Down

0 comments on commit 1e44aa6

Please sign in to comment.