From ec5b79ed1067536a6dcd73ac237ff9d546ef9aea Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:46:43 +0100 Subject: [PATCH] fix post-verge sync (#404) * fix post-verge sync * review: fix truncated comment --- core/blockchain.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index 36e58ca8df57..9143fd6c699d 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1768,6 +1768,11 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) if !bc.stateCache.InTransition() && !bc.stateCache.Transitioned() { bc.stateCache.StartVerkleTransition(parent.Root, emptyVerkleRoot, bc.Config(), bc.Config().PragueTime, parent.Root) } + } else { + // If the verkle activation time hasn't started, declare it as "not started". + // This is so that if the miner activates the conversion, the insertion happens + // in the correct mode. + bc.stateCache.InitTransitionStatus(false, false) } if parent.Number.Uint64() == conversionBlock { bc.StartVerkleTransition(parent.Root, emptyVerkleRoot, bc.Config(), &parent.Time, parent.Root)