aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionFramework.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-10 02:41:51 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-10 21:24:56 +0800
commit702ee20a0179afe607383554ee89b0f863e14f63 (patch)
tree8c17629066ed981e04fd0027bc769dbd95bf7da3 /test/ExecutionFramework.cpp
parent4cf44f1b41fe021653a6f45c72c19253dd352459 (diff)
downloaddexon-solidity-702ee20a0179afe607383554ee89b0f863e14f63.tar.gz
dexon-solidity-702ee20a0179afe607383554ee89b0f863e14f63.tar.zst
dexon-solidity-702ee20a0179afe607383554ee89b0f863e14f63.zip
Create getBlockByNumber RPC method
Diffstat (limited to 'test/ExecutionFramework.cpp')
-rw-r--r--test/ExecutionFramework.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ExecutionFramework.cpp b/test/ExecutionFramework.cpp
index 70139642..f4e5fcef 100644
--- a/test/ExecutionFramework.cpp
+++ b/test/ExecutionFramework.cpp
@@ -127,13 +127,13 @@ void ExecutionFramework::sendEther(Address const& _to, u256 const& _value)
size_t ExecutionFramework::currentTimestamp()
{
- auto latestBlock = m_rpc.rpcCall("eth_getBlockByNumber", {"\"latest\"", "false"});
+ auto latestBlock = m_rpc.eth_getBlockByNumber("latest", false);
return size_t(u256(latestBlock.get("timestamp", "invalid").asString()));
}
size_t ExecutionFramework::blockTimestamp(u256 _number)
{
- auto latestBlock = m_rpc.rpcCall("eth_getBlockByNumber", {toString(_number), "false"});
+ auto latestBlock = m_rpc.eth_getBlockByNumber(toString(_number), false);
return size_t(u256(latestBlock.get("timestamp", "invalid").asString()));
}