mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge e0a70c5b4f into merged_master (Bitcoin PR bitcoin/bitcoin#27605)
This commit is contained in:
commit
a40347d7f5
21 changed files with 101 additions and 102 deletions
|
|
@ -204,10 +204,10 @@ void JSONRPCRequest::parse(const UniValue& valRequest)
|
|||
const UniValue& request = valRequest.get_obj();
|
||||
|
||||
// Parse id now so errors from here on will have the id
|
||||
id = find_value(request, "id");
|
||||
id = request.find_value("id");
|
||||
|
||||
// Parse method
|
||||
UniValue valMethod = find_value(request, "method");
|
||||
const UniValue& valMethod{request.find_value("method")};
|
||||
if (valMethod.isNull())
|
||||
throw JSONRPCError(RPC_INVALID_REQUEST, "Missing method");
|
||||
if (!valMethod.isStr())
|
||||
|
|
@ -220,7 +220,7 @@ void JSONRPCRequest::parse(const UniValue& valRequest)
|
|||
LogPrint(BCLog::RPC, "ThreadRPCServer method=%s user=%s\n", SanitizeString(strMethod), this->authUser);
|
||||
|
||||
// Parse params
|
||||
UniValue valParams = find_value(request, "params");
|
||||
const UniValue& valParams{request.find_value("params")};
|
||||
if (valParams.isArray() || valParams.isObject())
|
||||
params = valParams;
|
||||
else if (valParams.isNull())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue