Skip to content

Commit 1e44aa6

Browse files
committed
fixup! rewind to last non verified block when restart fast node
1 parent 8c6d5a8 commit 1e44aa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/remote_state_verifier.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func NewVerifyManager(blockchain *BlockChain, peers verifyPeers, allowInsecure b
7171
numberU64 := number.Uint64()
7272
blockchain.SetHead(numberU64)
7373
block := blockchain.GetBlockByNumber(numberU64)
74-
for i := 0; i < maxForkHeight; i++ {
74+
for i := 0; i < maxForkHeight && block.NumberU64() > 0; i++ {
7575
// When inserting a block,
7676
// the block before 11 blocks will be verified,
7777
// so the parent block of 11-22 will directly write the verification information.

0 commit comments

Comments
 (0)