diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -727,7 +727,7 @@ UniValue combinerawtransaction(const Config &config, const JSONRPCRequest &request) { - if (request.fHelp || request.params.size() != 1) + if (request.fHelp || request.params.size() != 1) { throw std::runtime_error( "combinerawtransaction [\"hexstring\",...]\n" "\nCombine multiple partially signed transactions into one " @@ -751,6 +751,7 @@ "\nExamples:\n" + HelpExampleCli("combinerawtransaction", "[\"myhex1\", \"myhex2\", \"myhex3\"]")); + } UniValue txs = request.params[0].get_array(); std::vector txVariants(txs.size()); @@ -778,16 +779,16 @@ LOCK(mempool.cs); CCoinsViewCache &viewChain = *pcoinsTip; CCoinsViewMemPool viewMempool(&viewChain, mempool); - view.SetBackend( - viewMempool); // temporarily switch cache backend to db+mempool view + // temporarily switch cache backend to db+mempool view + view.SetBackend(viewMempool); for (const CTxIn &txin : mergedTx.vin) { - view.AccessCoin(txin.prevout); // Load entries from viewChain into - // view; can fail. + // Load entries from viewChain into view; can fail. + view.AccessCoin(txin.prevout); } - view.SetBackend( - viewDummy); // switch back to avoid locking mempool for too long + // switch back to avoid locking mempool for too long + view.SetBackend(viewDummy); } // Use CTransaction for the constant parts of the @@ -932,8 +933,9 @@ {UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true); CMutableTransaction mtx; - if (!DecodeHexTx(mtx, request.params[0].get_str())) + if (!DecodeHexTx(mtx, request.params[0].get_str())) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); + } // Fetch previous transactions (inputs): CCoinsView viewDummy;