From e666efcdba527a58175f9de3357dd19bb5880178 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Mon, 14 Aug 2017 19:38:18 -0400 Subject: Get rid of redundant RPC params.size() checks No change in behavior. --- src/rpc/blockchain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rpc/blockchain.cpp') 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()); -- cgit v1.2.3