Browse Source

Force Interpreter VM when VM tracing requested.

Fixes https://github.com/ethereum/cpp-ethereum/issues/2585.
cl-refactor
Paweł Bylica 10 years ago
parent
commit
f16cb2e23e
  1. 17
      libethereum/State.cpp

17
libethereum/State.cpp

@ -1137,6 +1137,12 @@ bool State::isTrieGood(bool _enforceRefs, bool _requireNoLeftOvers) const
ExecutionResult State::execute(LastHashes const& _lh, Transaction const& _t, Permanence _p, OnOpFunc const& _onOp)
{
auto onOp = _onOp;
#if ETH_VMTRACE
if (isChannelVisible<VMTraceChannel>())
onOp = Executive::simpleTrace(); // override tracer
#endif
#if ETH_PARANOIA
paranoia("start of execution.", true);
State old(*this);
@ -1161,16 +1167,11 @@ ExecutionResult State::execute(LastHashes const& _lh, Transaction const& _t, Per
ctrace << toHex(e.t().rlp());
#endif
if (!e.execute())
#if ETH_VMTRACE
{
if (isChannelVisible<VMTraceChannel>())
e.go(e.simpleTrace());
else
e.go(_onOp);
if (onOp)
VMFactory::setKind(VMKind::Interpreter); // force interpreter if a trace is wanted
e.go(onOp);
}
#else
e.go(_onOp);
#endif
e.finalize();
#if ETH_PARANOIA

Loading…
Cancel
Save