diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-06-15 18:18:00 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-02 18:56:33 +0800 |
commit | 334c023c7231810f28ca5ea04f14df3f722cea07 (patch) | |
tree | a64e19e9388e1ddc0381cc464cf4eceb19b4e339 /test/RPCSession.cpp | |
parent | a5608b31a759031377ec91300ad7a470d48bb1d2 (diff) | |
download | dexon-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.cpp | 8 |
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"( |