change 7702 prestate tracer test case to use a premerged genesis configuration. remove changes from util.go

This commit is contained in:
Jared Wasinger 2025-08-05 19:00:55 +09:00
parent a9e3685d44
commit 244af6b07c
2 changed files with 12 additions and 48 deletions

File diff suppressed because one or more lines are too long

View file

@ -28,7 +28,6 @@ import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/params"
// Force-load native and js packages, to trigger registration
_ "github.com/ethereum/go-ethereum/eth/tracers/js"
@ -68,13 +67,7 @@ func (c *traceContext) toBlockContext(genesis *core.Genesis) vm.BlockContext {
context.BaseFee = (*big.Int)(c.BaseFee)
}
isPostMerge := func(config *params.ChainConfig, blockNum uint64, timestamp uint64) bool {
mergedAtGenesis := config.TerminalTotalDifficulty != nil && config.TerminalTotalDifficulty.Sign() == 0
return mergedAtGenesis ||
config.MergeNetsplitBlock != nil && blockNum >= config.MergeNetsplitBlock.Uint64() ||
config.ShanghaiTime != nil && timestamp >= *config.ShanghaiTime
}
if isPostMerge(genesis.Config, uint64(c.Number), uint64(c.Time)) {
if genesis.Config.TerminalTotalDifficulty != nil && genesis.Config.TerminalTotalDifficulty.Sign() == 0 {
context.Random = &genesis.Mixhash
}