From fa4c16d2e72a8ec1032da49a68c9913c2595dbfe Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 6 Dec 2017 10:52:29 -0500 Subject: qa: Add getrawtransaction in_active_chain=False test --- src/rpc/rawtransaction.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/rpc') diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index b26f10e476..018c255325 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -155,14 +155,12 @@ UniValue getrawtransaction(const JSONRPCRequest& request) if (!request.params[2].isNull()) { uint256 blockhash = ParseHashV(request.params[2], "parameter 3"); - if (!blockhash.IsNull()) { - BlockMap::iterator it = mapBlockIndex.find(blockhash); - if (it == mapBlockIndex.end()) { - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block hash not found"); - } - blockindex = it->second; - in_active_chain = chainActive.Contains(blockindex); + BlockMap::iterator it = mapBlockIndex.find(blockhash); + if (it == mapBlockIndex.end()) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block hash not found"); } + blockindex = it->second; + in_active_chain = chainActive.Contains(blockindex); } CTransactionRef tx; -- cgit v1.2.3