Skip to content

Commit

Permalink
Merge d692d19 into merged_master (Bitcoin PR #19849)
Browse files Browse the repository at this point in the history
More RPC cleanups. This one discovered that the `createpsbt` and
`rawblindrawtransaction` RPCs had incorrect argument lists :)
  • Loading branch information
apoelstra committed Nov 29, 2020
2 parents 7785a8f + d692d19 commit 166e5aa
Show file tree
Hide file tree
Showing 3 changed files with 402 additions and 302 deletions.
4 changes: 2 additions & 2 deletions src/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);
Expand Down
Loading

0 comments on commit 166e5aa

Please sign in to comment.