Skip to content

Commit

Permalink
[RPC]Fix upper limit check of the number of params
Browse files Browse the repository at this point in the history
In ElementsProject#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.
  • Loading branch information
AkioNak committed May 16, 2019
1 parent 6cf1bd5 commit 4b30f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 <label> in transactions with at least [minconf] confirmations.\n"
Expand Down

0 comments on commit 4b30f42

Please sign in to comment.