diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-10-14 19:13:30 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-10-14 19:13:30 +0800 |
commit | 25d71c1167304f59ed9e5b845475d74ebd292362 (patch) | |
tree | b9d42694203f7cca37e6cbc1e0926c7ee68c30fb | |
parent | eb72beb7c3391c4b0706c607e131e885fec48882 (diff) | |
download | dexon-solidity-25d71c1167304f59ed9e5b845475d74ebd292362.tar dexon-solidity-25d71c1167304f59ed9e5b845475d74ebd292362.tar.gz dexon-solidity-25d71c1167304f59ed9e5b845475d74ebd292362.tar.bz2 dexon-solidity-25d71c1167304f59ed9e5b845475d74ebd292362.tar.lz dexon-solidity-25d71c1167304f59ed9e5b845475d74ebd292362.tar.xz dexon-solidity-25d71c1167304f59ed9e5b845475d74ebd292362.tar.zst dexon-solidity-25d71c1167304f59ed9e5b845475d74ebd292362.zip |
fixed jsonrpc param types
-rw-r--r-- | ethstubclient.h | 6 | ||||
-rw-r--r-- | jsonrpc.cpp | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ethstubclient.h b/ethstubclient.h index fde0cf39..ce9e0a9a 100644 --- a/ethstubclient.h +++ b/ethstubclient.h @@ -39,7 +39,7 @@ p["block"] = block; p["numberOrHash"] = numberOrHash; Json::Value result = this->client->CallMethod("block",p); - if (result.isArray()) + if (result.isObject()) return result; else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); @@ -374,7 +374,7 @@ p["s"] = s; p["numberOrHash"] = numberOrHash; Json::Value result = this->client->CallMethod("transaction",p); - if (result.isArray()) + if (result.isObject()) return result; else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); @@ -388,7 +388,7 @@ p["numberOrHash"] = numberOrHash; p["numberOrHash"] = numberOrHash; Json::Value result = this->client->CallMethod("uncle",p); - if (result.isArray()) + if (result.isObject()) return result; else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); diff --git a/jsonrpc.cpp b/jsonrpc.cpp index 3728a1a4..9ef1e42d 100644 --- a/jsonrpc.cpp +++ b/jsonrpc.cpp @@ -256,6 +256,7 @@ BOOST_AUTO_TEST_CASE(jsonrpc_toFixed) BOOST_AUTO_TEST_CASE(jsonrpc_transact) { cnote << "Testing jsonrpc transact..."; + web3.ethereum()->setAddress(keys[0].address()); auto receiver = KeyPair::create(); dev::eth::mine(*(web3.ethereum()), 1); |