diff --git a/libethereum/Executive.cpp b/libethereum/Executive.cpp index d281a00fd..f78e8f7f4 100644 --- a/libethereum/Executive.cpp +++ b/libethereum/Executive.cpp @@ -325,7 +325,8 @@ bool Executive::go(OnOpFunc const& _onOp) #endif try { - auto vm = VMFactory::create(); + // Create VM instance. Force Interpreter if tracing requested. + auto vm = _onOp ? VMFactory::create(VMKind::Interpreter) : VMFactory::create(); if (m_isCreation) { auto out = vm->exec(m_gas, *m_ext, _onOp); diff --git a/libethereum/State.cpp b/libethereum/State.cpp index 27263caf8..3127ad1f6 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -1167,11 +1167,7 @@ ExecutionResult State::execute(LastHashes const& _lh, Transaction const& _t, Per ctrace << toHex(e.t().rlp()); #endif if (!e.execute()) - { - if (onOp) - VMFactory::setKind(VMKind::Interpreter); // force interpreter if a trace is wanted e.go(onOp); - } e.finalize(); #if ETH_PARANOIA