mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 04:15:54 +00:00
1574136a25
Move the EVM setup and call in precompile tests to `fixtureCallEvm` in `call_evm`. Extra return values needed for testing are returned specially, and the convention for reporting gas used is changed to match `asmCallEvm`. Although the precompile tests used `execPrecompiles` before, `executeOpcodes` does perfectly well as a substitute, allowing `fixtureCallEvm` to be shared. _Significantly, this patch also makes `Computation` more or less an internal type of the EVM now._ Nothing outside the EVM (except `call_evm`) needs access any more to `Computation`, `execComputation`, `executeOpcodes` or `execPrecompiles`. Many imports can be trimmed, some files removed, and EVMC is much closer. (As a bonus, the functions in `call_evm` reveal what capabilities parts of the program have needed over time, makes certain bugs and inconsistencies clearer, and suggests how to refactor into a more useful shared entry point.) Signed-off-by: Jamie Lokier <jamie@shareable.org>