diff --git a/evmjit/libevmjit-cpp/JitVM.cpp b/evmjit/libevmjit-cpp/JitVM.cpp index 55dcd94f8..e28fcd39f 100644 --- a/evmjit/libevmjit-cpp/JitVM.cpp +++ b/evmjit/libevmjit-cpp/JitVM.cpp @@ -1,10 +1,14 @@ #pragma GCC diagnostic ignored "-Wconversion" + #include "JitVM.h" + +#include +#include #include #include -#include #include + #include "Utils.h" namespace dev @@ -27,12 +31,13 @@ bytesConstRef JitVM::go(ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _step) if (rejected) { - UNTESTED; - std::cerr << "Rejected\n"; + cwarn << "Execution rejected by EVM JIT (gas limit: " << m_gas << "), executing with interpreter"; VMFactory::setKind(VMKind::Interpreter); m_fallbackVM = VMFactory::create(m_gas); VMFactory::setKind(VMKind::JIT); - return m_fallbackVM->go(_ext, _onOp, _step); + auto&& output = m_fallbackVM->go(_ext, _onOp, _step); + m_gas = m_fallbackVM->gas(); // copy remaining gas, Executive expects it + return output; } m_data.gas = static_cast(m_gas);