From 4b30f42dc01b79fc911e7ea30dbe25c71c70b769 Mon Sep 17 00:00:00 2001 From: Akio Nakamura Date: Thu, 16 May 2019 19:30:05 +0900 Subject: [PATCH] [RPC]Fix upper limit check of the number of params In #515, the assetlabel has been added to two rpc command (getreceivedbyaddress and getreceivedbylabel) as the 3rd param. So this patch makes there rpc command accept the 3rd param. --- src/wallet/rpcwallet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 360651ebbb..ad196a2cb1 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -609,7 +609,7 @@ static UniValue getreceivedbyaddress(const JSONRPCRequest& request) return NullUniValue; } - if (request.fHelp || request.params.size() < 1 || request.params.size() > 2) + if (request.fHelp || request.params.size() < 1 || request.params.size() > 3) throw std::runtime_error( "getreceivedbyaddress \"address\" ( minconf )\n" "\nReturns the total amount received by the given address in transactions with at least minconf confirmations.\n" @@ -692,7 +692,7 @@ static UniValue getreceivedbylabel(const JSONRPCRequest& request) return NullUniValue; } - if (request.fHelp || request.params.size() < 1 || request.params.size() > 2) + if (request.fHelp || request.params.size() < 1 || request.params.size() > 3) throw std::runtime_error( "getreceivedbylabel \"label\" ( minconf )\n" "\nReturns the total amount received by addresses with