[RPC] Various rpc argument fixes #10783
Merged
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
Jump to file or symbol
Failed to load files and symbols.
| @@ -137,7 +137,7 @@ UniValue getrawtransaction(const JSONRPCRequest& request) | ||
| // Accept either a bool (true) or a num (>=1) to indicate verbose output. | ||
| bool fVerbose = false; | ||
| - if (request.params.size() > 1) { | ||
| + if (!request.params[1].isNull()) { | ||
promag
Contributor
|
||
| if (request.params[1].isNum()) { | ||
| if (request.params[1].get_int() != 0) { | ||
| fVerbose = true; | ||
| @@ -211,7 +211,7 @@ UniValue gettxoutproof(const JSONRPCRequest& request) | ||
| CBlockIndex* pblockindex = NULL; | ||
| uint256 hashBlock; | ||
| - if (request.params.size() > 1) | ||
| + if (!request.params[1].isNull()) | ||
| { | ||
| hashBlock = uint256S(request.params[1].get_str()); | ||
| if (!mapBlockIndex.count(hashBlock)) | ||
| @@ -412,7 +412,7 @@ UniValue createrawtransaction(const JSONRPCRequest& request) | ||
| } | ||
| } | ||
| - if (request.params.size() > 3 && rbfOptIn != SignalsOptInRBF(rawTx)) { | ||
| + if (!request.params[3].isNull() && rbfOptIn != SignalsOptInRBF(rawTx)) { | ||
| throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter combination: Sequence number(s) contradict replaceable option"); | ||
| } | ||
Oops, something went wrong.
Avoid negation?