mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-22 15:59:26 +00:00
tests: fix DIFFICULTY error in state executor (#26465)
This commit is contained in:
parent
b8bc8c2465
commit
4ada314fff
1 changed files with 6 additions and 9 deletions
|
|
@ -249,16 +249,13 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
|
||||||
context.GetHash = vmTestBlockHash
|
context.GetHash = vmTestBlockHash
|
||||||
context.BaseFee = baseFee
|
context.BaseFee = baseFee
|
||||||
context.Random = nil
|
context.Random = nil
|
||||||
if config.IsLondon(new(big.Int)) {
|
if t.json.Env.Difficulty != nil {
|
||||||
if t.json.Env.Random != nil {
|
context.Difficulty = new(big.Int).Set(t.json.Env.Difficulty)
|
||||||
rnd := common.BigToHash(t.json.Env.Random)
|
}
|
||||||
context.Random = &rnd
|
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)
|
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)
|
evm := vm.NewEVM(context, txContext, statedb, config, vmconfig)
|
||||||
// Execute the message.
|
// Execute the message.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue