From 4c4de3102a4ee3d8359a8b598499d0e6ba71a8ac Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:56:08 +0100 Subject: [PATCH] fix: eip2935 block hash storage in chain makers (#351) --- core/chain_makers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/chain_makers.go b/core/chain_makers.go index d43e9126a2..0b262cba16 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -385,6 +385,10 @@ func GenerateVerkleChain(config *params.ChainConfig, parent *types.Block, engine preState := statedb.Copy() fmt.Println("prestate", preState.GetTrie().(*trie.VerkleTrie).ToDot()) + if config.IsPrague(b.header.Number, b.header.Time) { + ProcessParentBlockHash(statedb, b.header.Number.Uint64()-1, b.header.ParentHash) + } + // Mutate the state and block according to any hard-fork specs if daoBlock := config.DAOForkBlock; daoBlock != nil { limit := new(big.Int).Add(daoBlock, params.DAOForkExtraRange)