Skip to content

Commit bb3a39d

Browse files
committed
fix post-verge sync (#404)
* fix post-verge sync * review: fix truncated comment
1 parent afc364b commit bb3a39d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/blockchain.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,11 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
17681768
if !bc.stateCache.InTransition() && !bc.stateCache.Transitioned() {
17691769
bc.stateCache.StartVerkleTransition(parent.Root, emptyVerkleRoot, bc.Config(), bc.Config().PragueTime, parent.Root)
17701770
}
1771+
} else {
1772+
// If the verkle activation time hasn't started, declare it as "not started".
1773+
// This is so that if the miner activates the conversion, the insertion happens
1774+
// in the correct mode.
1775+
bc.stateCache.InitTransitionStatus(false, false)
17711776
}
17721777
if parent.Number.Uint64() == conversionBlock {
17731778
bc.StartVerkleTransition(parent.Root, emptyVerkleRoot, bc.Config(), &parent.Time, parent.Root)

0 commit comments

Comments
 (0)