aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorGregory Sanders <gsanders87@gmail.com>2017-07-10 11:44:39 -0400
committerGregory Sanders <gsanders87@gmail.com>2017-07-17 08:53:18 -0400
commit4dc1915bceacb94446454428da676772290b8c48 (patch)
tree10fa6d12a08414ccb2011f14f188574fcc14a789 /src/rpc/rawtransaction.cpp
parent999ef2073aa2b4aebfbe9bea6f9b12da52b8b2cb (diff)
check for null values in rpc args and handle appropriately
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index b878624df8..185bc7fd3d 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -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()) {
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");
}