|
|
@ -168,7 +168,7 @@ void JSONRPCRequest::parse(const UniValue& valRequest)
|
|
|
|
id = request.find_value("id");
|
|
|
|
id = request.find_value("id");
|
|
|
|
|
|
|
|
|
|
|
|
// Parse method
|
|
|
|
// Parse method
|
|
|
|
UniValue valMethod = request.find_value("method");
|
|
|
|
const UniValue& valMethod{request.find_value("method")};
|
|
|
|
if (valMethod.isNull())
|
|
|
|
if (valMethod.isNull())
|
|
|
|
throw JSONRPCError(RPC_INVALID_REQUEST, "Missing method");
|
|
|
|
throw JSONRPCError(RPC_INVALID_REQUEST, "Missing method");
|
|
|
|
if (!valMethod.isStr())
|
|
|
|
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);
|
|
|
|
LogPrint(BCLog::RPC, "ThreadRPCServer method=%s user=%s\n", SanitizeString(strMethod), this->authUser);
|
|
|
|
|
|
|
|
|
|
|
|
// Parse params
|
|
|
|
// Parse params
|
|
|
|
UniValue valParams = request.find_value("params");
|
|
|
|
const UniValue& valParams{request.find_value("params")};
|
|
|
|
if (valParams.isArray() || valParams.isObject())
|
|
|
|
if (valParams.isArray() || valParams.isObject())
|
|
|
|
params = valParams;
|
|
|
|
params = valParams;
|
|
|
|
else if (valParams.isNull())
|
|
|
|
else if (valParams.isNull())
|
|
|
|