mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-01 20:48:38 +00:00
cmd/evm/t8ntool: gate ProcessParentBlockHash on IsPrague || IsUBT
Mirror the IsPrague || IsUBT check used by core.PreExecution and the other refactored sites in #34812. UBT activates EIP-2935 too, so a UBT-only test config (e.g. tests/init.go Forks["Verkle"]) was silently skipping ProcessParentBlockHash here.
This commit is contained in:
parent
d446676fc4
commit
526a2b3a4f
1 changed files with 1 additions and 1 deletions
|
|
@ -233,7 +233,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
|
||||||
if beaconRoot := pre.Env.ParentBeaconBlockRoot; beaconRoot != nil {
|
if beaconRoot := pre.Env.ParentBeaconBlockRoot; beaconRoot != nil {
|
||||||
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
|
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
|
||||||
}
|
}
|
||||||
if pre.Env.BlockHashes != nil && chainConfig.IsPrague(new(big.Int).SetUint64(pre.Env.Number), pre.Env.Timestamp) {
|
if pre.Env.BlockHashes != nil && (chainConfig.IsPrague(new(big.Int).SetUint64(pre.Env.Number), pre.Env.Timestamp) || chainConfig.IsUBT(new(big.Int).SetUint64(pre.Env.Number), pre.Env.Timestamp)) {
|
||||||
var (
|
var (
|
||||||
prevNumber = pre.Env.Number - 1
|
prevNumber = pre.Env.Number - 1
|
||||||
prevHash = pre.Env.BlockHashes[math.HexOrDecimal64(prevNumber)]
|
prevHash = pre.Env.BlockHashes[math.HexOrDecimal64(prevNumber)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue