diff options
-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); |