Skip to content

Commit a70d025

Browse files
committed
fixup some rpc param counting for rpc help
1 parent 8bc6d1f commit a70d025

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ UniValue getrawchangeaddress(const JSONRPCRequest& request)
205205
return NullUniValue;
206206
}
207207

208-
if (request.fHelp || request.params.size() > 1)
208+
if (request.fHelp || request.params.size() > 0)
209209
throw std::runtime_error(
210210
"getrawchangeaddress\n"
211211
"\nReturns a new Bitcoin address, for receiving change.\n"
@@ -484,7 +484,7 @@ UniValue listaddressgroupings(const JSONRPCRequest& request)
484484
return NullUniValue;
485485
}
486486

487-
if (request.fHelp)
487+
if (request.fHelp || request.params.size() != 0)
488488
throw std::runtime_error(
489489
"listaddressgroupings\n"
490490
"\nLists groups of addresses which have had their common ownership\n"
@@ -1730,7 +1730,7 @@ UniValue listsinceblock(const JSONRPCRequest& request)
17301730
return NullUniValue;
17311731
}
17321732

1733-
if (request.fHelp)
1733+
if (request.fHelp || request.params.size() > 3)
17341734
throw std::runtime_error(
17351735
"listsinceblock ( \"blockhash\" target_confirmations include_watchonly)\n"
17361736
"\nGet all transactions in blocks since block [blockhash], or all transactions if omitted\n"
@@ -2672,7 +2672,7 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
26722672
return NullUniValue;
26732673
}
26742674

2675-
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
2675+
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
26762676
throw std::runtime_error(
26772677
"fundrawtransaction \"hexstring\" ( options )\n"
26782678
"\nAdd inputs to a transaction until it has enough in value to meet its out value.\n"

0 commit comments

Comments
 (0)