Skip to content

Commit fa80c81

Browse files
author
MarcoFalke
committed
Assert that RPCArg names are equal to CRPCCommand ones (blockchain)
1 parent 89a8299 commit fa80c81

File tree

2 files changed

+184
-121
lines changed

2 files changed

+184
-121
lines changed

src/rest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static bool rest_block_notxdetails(const util::Ref& context, HTTPRequest* req, c
303303
}
304304

305305
// A bit of a hack - dependency on a function defined in rpc/blockchain.cpp
306-
UniValue getblockchaininfo(const JSONRPCRequest& request);
306+
RPCHelpMan getblockchaininfo();
307307

308308
static bool rest_chaininfo(const util::Ref& context, HTTPRequest* req, const std::string& strURIPart)
309309
{
@@ -316,7 +316,7 @@ static bool rest_chaininfo(const util::Ref& context, HTTPRequest* req, const std
316316
case RetFormat::JSON: {
317317
JSONRPCRequest jsonRequest(context);
318318
jsonRequest.params = UniValue(UniValue::VARR);
319-
UniValue chainInfoObject = getblockchaininfo(jsonRequest);
319+
UniValue chainInfoObject = getblockchaininfo().HandleRequest(jsonRequest);
320320
std::string strJSON = chainInfoObject.write() + "\n";
321321
req->WriteHeader("Content-Type", "application/json");
322322
req->WriteReply(HTTP_OK, strJSON);

0 commit comments

Comments
 (0)