aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionFramework.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/ExecutionFramework.cpp')
-rw-r--r--test/ExecutionFramework.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ExecutionFramework.cpp b/test/ExecutionFramework.cpp
index 0c6e0cff..9e3ecac3 100644
--- a/test/ExecutionFramework.cpp
+++ b/test/ExecutionFramework.cpp
@@ -46,6 +46,7 @@ string getIPCSocketPath()
ExecutionFramework::ExecutionFramework() :
m_rpc(RPCSession::instance(getIPCSocketPath())),
m_optimize(dev::test::Options::get().optimize),
+ m_showMessages(dev::test::Options::get().showMessages),
m_sender(m_rpc.account(0))
{
m_rpc.test_rewindToBlock(0);
@@ -53,6 +54,16 @@ ExecutionFramework::ExecutionFramework() :
void ExecutionFramework::sendMessage(bytes const& _data, bool _isCreation, u256 const& _value)
{
+ if (m_showMessages)
+ {
+ if (_isCreation)
+ cout << "CREATE " << m_sender.hex() << ":" << endl;
+ else
+ cout << "CALL " << m_sender.hex() << " -> " << m_contractAddress.hex() << ":" << endl;
+ if (_value > 0)
+ cout << " value: " << _value << endl;
+ cout << " in: " << toHex(_data) << endl;
+ }
RPCSession::TransactionData d;
d.data = "0x" + toHex(_data);
d.from = "0x" + toString(m_sender);
@@ -79,6 +90,9 @@ void ExecutionFramework::sendMessage(bytes const& _data, bool _isCreation, u256
m_output = fromHex(code, WhenError::Throw);
}
+ if (m_showMessages)
+ cout << " out: " << toHex(m_output) << endl;
+
m_gasUsed = u256(receipt.gasUsed);
m_logs.clear();
for (auto const& log: receipt.logEntries)