diff --git a/src/rpc/jsonrpcrequest.cpp b/src/rpc/jsonrpcrequest.cpp index d3ff022244..8d5b49e0cb 100644 --- a/src/rpc/jsonrpcrequest.cpp +++ b/src/rpc/jsonrpcrequest.cpp @@ -1,47 +1,45 @@ // Copyright (c) 2018 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include #include void JSONRPCRequest::parse(const UniValue &valRequest) { // Parse request if (!valRequest.isObject()) { throw JSONRPCError(RPC_INVALID_REQUEST, "Invalid Request object"); } const UniValue &request = valRequest.get_obj(); // Parse id now so errors from here on will have the id id = find_value(request, "id"); // Parse method UniValue valMethod = find_value(request, "method"); if (valMethod.isNull()) { throw JSONRPCError(RPC_INVALID_REQUEST, "Missing method"); } if (!valMethod.isStr()) { throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string"); } strMethod = valMethod.get_str(); - if (strMethod != "getblocktemplate") { - LogPrint(BCLog::RPC, "ThreadRPCServer method=%s\n", - SanitizeString(strMethod)); - } + LogPrint(BCLog::RPC, "ThreadRPCServer method=%s\n", + SanitizeString(strMethod)); // Parse params UniValue valParams = find_value(request, "params"); if (valParams.isArray() || valParams.isObject()) { params = valParams; } else if (valParams.isNull()) { params = UniValue(UniValue::VARR); } else { throw JSONRPCError(RPC_INVALID_REQUEST, "Params must be an array or object"); } }