fix: eip2935 block hash storage in chain makers (#351)

This commit is contained in:
Guillaume Ballet 2024-01-29 21:56:08 +01:00
parent c1e0ff10ec
commit 4c4de3102a

View file

@ -385,6 +385,10 @@ func GenerateVerkleChain(config *params.ChainConfig, parent *types.Block, engine
preState := statedb.Copy() preState := statedb.Copy()
fmt.Println("prestate", preState.GetTrie().(*trie.VerkleTrie).ToDot()) 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 // Mutate the state and block according to any hard-fork specs
if daoBlock := config.DAOForkBlock; daoBlock != nil { if daoBlock := config.DAOForkBlock; daoBlock != nil {
limit := new(big.Int).Add(daoBlock, params.DAOForkExtraRange) limit := new(big.Int).Add(daoBlock, params.DAOForkExtraRange)