aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-08-14 19:38:18 -0400
committerRussell Yanofsky <russ@yanofsky.org>2017-08-14 19:38:18 -0400
commite666efcdba527a58175f9de3357dd19bb5880178 (patch)
tree560a1791dfa656ca7ff73af35b039e5dd9fc50db /src/rpc/blockchain.cpp
parentc2704ec98a1b7b35b6a7c1b6b26a3f16d44e8880 (diff)
downloadbitcoin-e666efcdba527a58175f9de3357dd19bb5880178.tar.xz
Get rid of redundant RPC params.size() checks
No change in behavior.
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r--src/rpc/blockchain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 24e0405a84..cc06cee6fe 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1489,11 +1489,11 @@ UniValue getchaintxstats(const JSONRPCRequest& request)
const CBlockIndex* pindex;
int blockcount = 30 * 24 * 60 * 60 / Params().GetConsensus().nPowTargetSpacing; // By default: 1 month
- if (request.params.size() > 0 && !request.params[0].isNull()) {
+ if (!request.params[0].isNull()) {
blockcount = request.params[0].get_int();
}
- bool havehash = request.params.size() > 1 && !request.params[1].isNull();
+ bool havehash = !request.params[1].isNull();
uint256 hash;
if (havehash) {
hash = uint256S(request.params[1].get_str());