Browse Source

Force Interpreter VM when VM tracing requested (moved from State to Executive).

Fixes https://github.com/ethereum/cpp-ethereum/issues/2585.
cl-refactor
Paweł Bylica 9 years ago
parent
commit
c30ae3216d
  1. 3
      libethereum/Executive.cpp
  2. 4
      libethereum/State.cpp

3
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);

4
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

Loading…
Cancel
Save