Restore state test transction context
In state tests when running prague system contracts the origin remains as the system account. Restore the prior tx context after running system contracts.
This commit is contained in:
parent
8b40d4e36f
commit
1b9940486e
|
@ -249,6 +249,7 @@ func ProcessParentBlockHash(prevHash common.Hash, vmenv *vm.EVM, statedb *state.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oldContext := vmenv.TxContext
|
||||||
msg := &Message{
|
msg := &Message{
|
||||||
From: params.SystemAddress,
|
From: params.SystemAddress,
|
||||||
GasLimit: 30_000_000,
|
GasLimit: 30_000_000,
|
||||||
|
@ -262,6 +263,7 @@ func ProcessParentBlockHash(prevHash common.Hash, vmenv *vm.EVM, statedb *state.
|
||||||
statedb.AddAddressToAccessList(params.HistoryStorageAddress)
|
statedb.AddAddressToAccessList(params.HistoryStorageAddress)
|
||||||
_, _, _ = vmenv.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
|
_, _, _ = vmenv.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
|
||||||
statedb.Finalise(true)
|
statedb.Finalise(true)
|
||||||
|
vmenv.Reset(oldContext, statedb)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseDepositLogs extracts the EIP-6110 deposit values from logs emitted by
|
// ParseDepositLogs extracts the EIP-6110 deposit values from logs emitted by
|
||||||
|
|
Loading…
Reference in New Issue