aboutsummaryrefslogtreecommitdiffstats
path: root/test/RPCSession.cpp
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-06-15 18:18:00 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-07-02 18:56:33 +0800
commit334c023c7231810f28ca5ea04f14df3f722cea07 (patch)
treea64e19e9388e1ddc0381cc464cf4eceb19b4e339 /test/RPCSession.cpp
parenta5608b31a759031377ec91300ad7a470d48bb1d2 (diff)
downloaddexon-solidity-334c023c7231810f28ca5ea04f14df3f722cea07.tar.gz
dexon-solidity-334c023c7231810f28ca5ea04f14df3f722cea07.tar.zst
dexon-solidity-334c023c7231810f28ca5ea04f14df3f722cea07.zip
Determine transaction status in RPC sessions.
Diffstat (limited to 'test/RPCSession.cpp')
-rw-r--r--test/RPCSession.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/RPCSession.cpp b/test/RPCSession.cpp
index 160b0047..9a253794 100644
--- a/test/RPCSession.cpp
+++ b/test/RPCSession.cpp
@@ -163,6 +163,11 @@ RPCSession::TransactionReceipt RPCSession::eth_getTransactionReceipt(string cons
receipt.gasUsed = result["gasUsed"].asString();
receipt.contractAddress = result["contractAddress"].asString();
receipt.blockNumber = result["blockNumber"].asString();
+ if (m_receiptHasStatusField)
+ {
+ BOOST_REQUIRE(!result["status"].isNull());
+ receipt.status = result["status"].asString();
+ }
for (auto const& log: result["logs"])
{
LogEntry entry;
@@ -225,7 +230,10 @@ void RPCSession::test_setChainParams(vector<string> const& _accounts)
if (test::Options::get().evmVersion() >= solidity::EVMVersion::spuriousDragon())
forks += "\"EIP158ForkBlock\": \"0x00\",\n";
if (test::Options::get().evmVersion() >= solidity::EVMVersion::byzantium())
+ {
forks += "\"byzantiumForkBlock\": \"0x00\",\n";
+ m_receiptHasStatusField = true;
+ }
if (test::Options::get().evmVersion() >= solidity::EVMVersion::constantinople())
forks += "\"constantinopleForkBlock\": \"0x00\",\n";
static string const c_configString = R"(