aboutsummaryrefslogtreecommitdiffstats
path: root/jsonrpc.cpp
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-16 09:46:47 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-16 09:46:47 +0800
commit9cbed5627829413ef86346f418991259784d966f (patch)
treef5e180208b602d964d7714a868d18d5e6a3b6845 /jsonrpc.cpp
parent46149f7249c141723f5c63ce425ab4af887fa7a8 (diff)
downloaddexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar
dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.gz
dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.bz2
dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.lz
dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.xz
dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.zst
dexon-solidity-9cbed5627829413ef86346f418991259784d966f.zip
common changes to unify apis
Diffstat (limited to 'jsonrpc.cpp')
-rw-r--r--jsonrpc.cpp31
1 files changed, 10 insertions, 21 deletions
diff --git a/jsonrpc.cpp b/jsonrpc.cpp
index 930b5686..081f1ccf 100644
--- a/jsonrpc.cpp
+++ b/jsonrpc.cpp
@@ -58,11 +58,7 @@ BOOST_AUTO_TEST_CASE(jsonrpc_balanceAt)
dev::KeyPair key = KeyPair::create();
auto address = key.address();
string balance = jsonrpcClient->balanceAt(toJS(address), 0);
- BOOST_CHECK_EQUAL(jsToDecimal(toJS(web3.ethereum()->balanceAt(address))), balance);
-}
-
-BOOST_AUTO_TEST_CASE(jsonrpc_block)
-{
+ BOOST_CHECK_EQUAL(toJS(web3.ethereum()->balanceAt(address)), balance);
}
BOOST_AUTO_TEST_CASE(jsonrpc_call)
@@ -162,17 +158,23 @@ BOOST_AUTO_TEST_CASE(jsonrpc_keys)
BOOST_AUTO_TEST_CASE(jsonrpc_lll)
{
+
}
BOOST_AUTO_TEST_CASE(jsonrpc_messages)
{
+ cnote << "Testing jsonrpc messages...";
+ Json::Value msgs = jsonrpcClient->messages(Json::Value());
+ auto messages = web3.ethereum()->messages(dev::eth::MessageFilter());
+ BOOST_CHECK_EQUAL(msgs.isArray(), true);
+ BOOST_CHECK_EQUAL(msgs.size(), messages.size());
}
BOOST_AUTO_TEST_CASE(jsonrpc_number)
{
- cnote << "Testing jsonrpc number...";
- int number = jsonrpcClient->number();
- BOOST_CHECK_EQUAL(number, web3.ethereum()->number() + 1);
+ cnote << "Testing jsonrpc number...";
+ int number = jsonrpcClient->number();
+ BOOST_CHECK_EQUAL(number, web3.ethereum()->number() + 1);
}
BOOST_AUTO_TEST_CASE(jsonrpc_number2)
@@ -293,19 +295,6 @@ BOOST_AUTO_TEST_CASE(jsonrpc_transact)
BOOST_CHECK_EQUAL(txAmount, jsToU256(messages[0u]["value"].asString()));
}
-BOOST_AUTO_TEST_CASE(jsonrpc_transaction)
-{
- // TODO! not working?
-// auto messages = jsonrpcClient->messages(Json::Value());
-// auto transactionNumber = messages[0u]["path"][0u].asInt();
-// auto transactionBlock = messages[0u]["block"].asString();
-// Json::Value p = jsonrpcClient->transaction(transactionNumber, transactionBlock);
-}
-
-BOOST_AUTO_TEST_CASE(jsonrpc_uncle)
-{
-}
-
BOOST_AUTO_TEST_CASE(jsonrpc_watch)
{