Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit f9cc0bf

Browse files
committed
Rename debug_accountRangeAt to debug_accountRange
1 parent 8d31fd3 commit f9cc0bf

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

libweb3jsonrpc/DebugFace.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ namespace dev {
1414
public:
1515
DebugFace()
1616
{
17-
this->bindAndAddMethod(jsonrpc::Procedure("debug_accountRangeAt", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_INTEGER,"param3",jsonrpc::JSON_STRING,"param4",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::DebugFace::debug_accountRangeAtI);
17+
this->bindAndAddMethod(jsonrpc::Procedure("debug_accountRange", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_INTEGER,"param3",jsonrpc::JSON_STRING,"param4",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::DebugFace::debug_accountRangeI);
1818
this->bindAndAddMethod(jsonrpc::Procedure("debug_traceTransaction", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceTransactionI);
1919
this->bindAndAddMethod(jsonrpc::Procedure("debug_storageRangeAt", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_INTEGER,"param3",jsonrpc::JSON_STRING,"param4",jsonrpc::JSON_STRING,"param5",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::DebugFace::debug_storageRangeAtI);
2020
this->bindAndAddMethod(jsonrpc::Procedure("debug_preimage", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::DebugFace::debug_preimageI);
2121
this->bindAndAddMethod(jsonrpc::Procedure("debug_traceBlockByNumber", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_INTEGER,"param2",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceBlockByNumberI);
2222
this->bindAndAddMethod(jsonrpc::Procedure("debug_traceBlockByHash", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceBlockByHashI);
2323
this->bindAndAddMethod(jsonrpc::Procedure("debug_traceCall", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_OBJECT,"param2",jsonrpc::JSON_STRING,"param3",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceCallI);
2424
}
25-
inline virtual void debug_accountRangeAtI(const Json::Value &request, Json::Value &response)
25+
inline virtual void debug_accountRangeI(const Json::Value &request, Json::Value &response)
2626
{
27-
response = this->debug_accountRangeAt(request[0u].asString(), request[1u].asInt(), request[2u].asString(), request[3u].asInt());
27+
response = this->debug_accountRange(request[0u].asString(), request[1u].asInt(), request[2u].asString(), request[3u].asInt());
2828
}
2929
inline virtual void debug_traceTransactionI(const Json::Value &request, Json::Value &response)
3030
{
@@ -50,7 +50,7 @@ namespace dev {
5050
{
5151
response = this->debug_traceCall(request[0u], request[1u].asString(), request[2u]);
5252
}
53-
virtual Json::Value debug_accountRangeAt(const std::string& param1, int param2, const std::string& param3, int param4) = 0;
53+
virtual Json::Value debug_accountRange(const std::string& param1, int param2, const std::string& param3, int param4) = 0;
5454
virtual Json::Value debug_traceTransaction(const std::string& param1, const Json::Value& param2) = 0;
5555
virtual Json::Value debug_storageRangeAt(const std::string& param1, int param2, const std::string& param3, const std::string& param4, int param5) = 0;
5656
virtual std::string debug_preimage(const std::string& param1) = 0;

libweb3jsonrpc/debug.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
2-
{ "name": "debug_accountRangeAt", "params": ["", 0, "", 0], "returns": {}},
2+
{ "name": "debug_accountRange", "params": ["", 0, "", 0], "returns": {}},
33
{ "name": "debug_traceTransaction", "params": ["", {}], "returns": {}},
44
{ "name": "debug_storageRangeAt", "params": ["", 0, "", "", 0], "returns": {}},
55
{ "name": "debug_preimage", "params": [""], "returns": ""},

test/unittests/libweb3jsonrpc/WebThreeStubClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,14 +959,14 @@ class WebThreeStubClient : public jsonrpc::Client
959959
else
960960
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
961961
}
962-
Json::Value debug_accountRangeAt(const std::string& param1, int param2, const std::string& param3, int param4) throw (jsonrpc::JsonRpcException)
962+
Json::Value debug_accountRange(const std::string& param1, int param2, const std::string& param3, int param4) throw (jsonrpc::JsonRpcException)
963963
{
964964
Json::Value p;
965965
p.append(param1);
966966
p.append(param2);
967967
p.append(param3);
968968
p.append(param4);
969-
Json::Value result = this->CallMethod("debug_accountRangeAt", p);
969+
Json::Value result = this->CallMethod("debug_accountRange", p);
970970
if (result.isObject())
971971
return result;
972972
else

test/unittests/libweb3jsonrpc/jsonrpc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ BOOST_AUTO_TEST_CASE(web3_sha3)
596596
BOOST_CHECK_EQUAL("0xc6888fa159d67f77c2f3d7a402e199802766bd7e8d4d1ecd2274fc920265d56a", result);
597597
}
598598

599-
BOOST_AUTO_TEST_CASE(debugAccountRangeAtFinalBlockState)
599+
BOOST_AUTO_TEST_CASE(debugAccountRangeFinalBlockState)
600600
{
601601
// mine to get some balance at coinbase
602602
dev::eth::mine(*(web3->ethereum()), 1);
@@ -617,11 +617,11 @@ BOOST_AUTO_TEST_CASE(debugAccountRangeAtFinalBlockState)
617617
string receiverHash = toString(sha3(receiver));
618618

619619
// receiver doesn't exist in the beginning of the 2nd block
620-
Json::Value result = rpcClient->debug_accountRangeAt("2", 0, "0", 100);
620+
Json::Value result = rpcClient->debug_accountRange("2", 0, "0", 100);
621621
BOOST_CHECK(!result["addressMap"].isMember(receiverHash));
622622

623623
// receiver exists in the end of the 2nd block
624-
result = rpcClient->debug_accountRangeAt("2", 1, "0", 100);
624+
result = rpcClient->debug_accountRange("2", 1, "0", 100);
625625
BOOST_CHECK(result["addressMap"].isMember(receiverHash));
626626
BOOST_CHECK_EQUAL(result["addressMap"][receiverHash], toString(receiver));
627627
}

0 commit comments

Comments
 (0)