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 Jun 5, 2019
1 parent d8d1e4f commit 40b2f30
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 @@ -635,7 +635,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(
RPCHelpMan{"getreceivedbyaddress",
"\nReturns the total amount received by the given address in transactions with at least minconf confirmations.\n",
Expand Down Expand Up @@ -723,7 +723,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(
RPCHelpMan{"getreceivedbylabel",
"\nReturns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.\n",
Expand Down

0 comments on commit 40b2f30

Please sign in to comment.