message: rpc: Style fixups in gettxoutproof
diff: @@ -242,8 +242,9 @@ static UniValue gettxoutproof(const JSONRPCRequest& request)
  for (unsigned int idx = 0; idx < txids.size(); idx++) {
  const UniValue& txid = txids[idx];
  uint256 hash(ParseHashV(txid, "txid"));
  - if (setTxids.count(hash))
  + if (setTxids.count(hash)) {
  throw JSONRPCError(RPC_INVALID_PARAMETER, std::string("Invalid parameter, duplicated txid: ") + txid.get_str());
  + }
  setTxids.insert(hash);
  oneTxid = hash;
  }
  @@ -278,8 +279,7 @@ static UniValue gettxoutproof(const JSONRPCRequest& request)
  LOCK(cs_main);
  - if (pblockindex == nullptr)
  - {
  + if (pblockindex == nullptr) {
  CTransactionRef tx;
  if (!GetTransaction(oneTxid, tx, Params().GetConsensus(), hashBlock) || hashBlock.IsNull())
  throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Transaction not yet in block");
  @@ -290,15 +290,19 @@ static UniValue gettxoutproof(const JSONRPCRequest& request)
  }
  CBlock block;
  - if(!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
  + if (!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus())) {
  throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
  + }
  unsigned int ntxFound = 0;
  - for (const auto& tx : block.vtx)
  - if (setTxids.count(tx->GetHash()))
  + for (const auto& tx : block.vtx) {
  + if (setTxids.count(tx->GetHash())) {
  ntxFound++;
  - if (ntxFound != setTxids.size())
  + }
  + }
  + if (ntxFound != setTxids.size()) {
  throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Not all transactions found in specified or retrieved block");
  + }
  CDataStream ssMB(SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS);
  CMerkleBlock mb(block, setTxids);
  