mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 16:52:21 +02:00
Assert that RPCArg names are equal to CRPCCommand ones (blockchain)
This commit is contained in:
@@ -303,7 +303,7 @@ static bool rest_block_notxdetails(const util::Ref& context, HTTPRequest* req, c
|
||||
}
|
||||
|
||||
// A bit of a hack - dependency on a function defined in rpc/blockchain.cpp
|
||||
UniValue getblockchaininfo(const JSONRPCRequest& request);
|
||||
RPCHelpMan getblockchaininfo();
|
||||
|
||||
static bool rest_chaininfo(const util::Ref& context, HTTPRequest* req, const std::string& strURIPart)
|
||||
{
|
||||
@@ -316,7 +316,7 @@ static bool rest_chaininfo(const util::Ref& context, HTTPRequest* req, const std
|
||||
case RetFormat::JSON: {
|
||||
JSONRPCRequest jsonRequest(context);
|
||||
jsonRequest.params = UniValue(UniValue::VARR);
|
||||
UniValue chainInfoObject = getblockchaininfo(jsonRequest);
|
||||
UniValue chainInfoObject = getblockchaininfo().HandleRequest(jsonRequest);
|
||||
std::string strJSON = chainInfoObject.write() + "\n";
|
||||
req->WriteHeader("Content-Type", "application/json");
|
||||
req->WriteReply(HTTP_OK, strJSON);
|
||||
|
Reference in New Issue
Block a user