scripted-diff: Use UniValue::find_value method

-BEGIN VERIFY SCRIPT-
 sed --regexp-extended -i 's/find_value\(([^ ,]+), /\1.find_value(/g' $(git grep -l find_value)
-END VERIFY SCRIPT-
This commit is contained in:
MarcoFalke
2023-05-09 09:25:50 +02:00
parent fa548ac872
commit fa422aeec2
16 changed files with 77 additions and 77 deletions

View File

@@ -165,10 +165,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");
UniValue valMethod = request.find_value("method");
if (valMethod.isNull())
throw JSONRPCError(RPC_INVALID_REQUEST, "Missing method");
if (!valMethod.isStr())
@@ -181,7 +181,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");
UniValue valParams = request.find_value("params");
if (valParams.isArray() || valParams.isObject())
params = valParams;
else if (valParams.isNull())