diff --git a/libethereum/Executive.cpp b/libethereum/Executive.cpp index 3bf26cf89..773bc2d38 100644 --- a/libethereum/Executive.cpp +++ b/libethereum/Executive.cpp @@ -166,8 +166,9 @@ bool Executive::go(OnOpFunc const& _onOp) { if (m_vm) { +#if ETH_TIMED_EXECUTIONS boost::timer t; -// auto sgas = m_vm->gas(); +#endif try { m_out = m_vm->go(*m_ext, _onOp); @@ -188,11 +189,9 @@ bool Executive::go(OnOpFunc const& _onOp) } catch (VMException const& _e) { - clog(StateChat) << "Safe VM Exception"; - m_endGas = 0;//m_vm->gas(); + clog(StateSafeExceptions) << "Safe VM Exception. " << diagnostic_information(_e); + m_endGas = 0; m_excepted = true; - - // Write state out only in the case of a non-excepted transaction. m_ext->revert(); } catch (Exception const& _e) @@ -205,7 +204,9 @@ bool Executive::go(OnOpFunc const& _onOp) // TODO: AUDIT: check that this can never reasonably happen. Consider what to do if it does. cwarn << "Unexpected std::exception in VM. This is probably unrecoverable. " << _e.what(); } -// cnote << "VM took:" << t.elapsed() << "; gas used: " << (sgas - m_endGas); +#if ETH_TIMED_EXECUTIONS + cnote << "VM took:" << t.elapsed() << "; gas used: " << (sgas - m_endGas); +#endif } return true; } diff --git a/libethereum/State.h b/libethereum/State.h index afa1f1d2c..a85c622df 100644 --- a/libethereum/State.h +++ b/libethereum/State.h @@ -51,6 +51,7 @@ class BlockChain; struct StateChat: public LogChannel { static const char* name() { return "-S-"; } static const int verbosity = 4; }; struct StateTrace: public LogChannel { static const char* name() { return "=S="; } static const int verbosity = 7; }; struct StateDetail: public LogChannel { static const char* name() { return "/S/"; } static const int verbosity = 14; }; +struct StateSafeExceptions: public LogChannel { static const char* name() { return "(S)"; } static const int verbosity = 21; }; struct PrecompiledAddress {