Unverified Commit 4ada314f authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub

tests: fix DIFFICULTY error in state executor (#26465)

parent b8bc8c24
......@@ -249,16 +249,13 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
context.GetHash = vmTestBlockHash
context.BaseFee = baseFee
context.Random = nil
if config.IsLondon(new(big.Int)) {
if t.json.Env.Random != nil {
rnd := common.BigToHash(t.json.Env.Random)
context.Random = &rnd
}
if t.json.Env.Difficulty != nil {
context.Difficulty = new(big.Int).Set(t.json.Env.Difficulty)
}
if config.IsLondon(new(big.Int)) && t.json.Env.Random != nil {
rnd := common.BigToHash(t.json.Env.Random)
context.Random = &rnd
context.Difficulty = big.NewInt(0)
} else {
if t.json.Env.Difficulty != nil {
context.Difficulty = new(big.Int).Set(t.json.Env.Difficulty)
}
}
evm := vm.NewEVM(context, txContext, statedb, config, vmconfig)
// Execute the message.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment