mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Assert that RPCArg names are equal to CRPCCommand ones (blockchain)
This commit is contained in:
parent
89a8299a14
commit
fa80c81487
2 changed files with 184 additions and 121 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue