message: Layout fixes, refined and extended comments
diff: @@ -3982,6 +3982,8 @@ bool CWallet::CreateMultipleZerocoinSpendTransaction(std::string &thirdPartyaddr
  // object storing coins being used for this spend (to avoid duplicates being considered)
  set<CBigNum> tempCoinsToUse;
  +
  + // total value of all inputs. Iteritively created in the following loop
  int64_t nValue = 0;
  for (std::vector<std::pair<int64_t, libzerocoin::CoinDenomination>>::const_iterator it = denominations.begin(); it != denominations.end(); it++)
  {
  @@ -4030,12 +4032,13 @@ bool CWallet::CreateMultipleZerocoinSpendTransaction(std::string &thirdPartyaddr
  }
  }
  }
  +
  // If no suitable coin found, fail.
  if (coinId == INT_MAX){
  strFailReason = _("it has to have at least two mint coins with at least 6 confirmation in order to spend a coin");
  return false;
  }
  - // 1. Get the current accumulator for denomination selection
  + // 1. Get the current accumulator for denomination selected
  libzerocoin::Accumulator accumulator(zcParams, accumulatorValue, denomination);
  // 2. Get pubcoin from the private coin
  libzerocoin::PublicCoin pubCoinSelected(zcParams, coinToUse.value, denomination);
  @@ -4120,7 +4123,7 @@ bool CWallet::CreateMultipleZerocoinSpendTransaction(std::string &thirdPartyaddr
  * if the hash is different (as it would be if we did all steps for a TxIn in one loop) the transaction creation will fail.
  */
  - // Remove all zerocoin related info between iterations
  + // Remove all zerocoin related info
  CMutableTransaction txTemp = txNew;
  BOOST_FOREACH(CTxIn &txTempIn, txTemp.vin) {
  if (txTempIn.scriptSig.IsZerocoinSpend()) {
  @@ -4129,8 +4132,6 @@ bool CWallet::CreateMultipleZerocoinSpendTransaction(std::string &thirdPartyaddr
  }
  }
  - vector<CBigNum> coinSerialNumbers;
  -
  uint256 txHashForMetadata = txTemp.GetHash();
  LogPrintf("txNew.GetHash: %s\n", txHashForMetadata.ToString());
  @@ -4160,8 +4161,6 @@ bool CWallet::CreateMultipleZerocoinSpendTransaction(std::string &thirdPartyaddr
  tempStorage.accumulatorBlockHash);
  spend.setVersion(tempStorage.txVersion);
  - coinSerialNumbers.push_back(spend.getCoinSerialNumber());
  -
  // Verify the coinSpend
  if (!spend.Verify(tempStorage.accumulator, metaData)) {
  strFailReason = _("the spend coin transaction did not verify");
  @@ -4214,7 +4213,7 @@ bool CWallet::CreateMultipleZerocoinSpendTransaction(std::string &thirdPartyaddr
  return false;
  }
  - // This last loop is to notify the wallet of changes to zerocoin spend info.
  + // After transaction creation and verification, this last loop is to notify the wallet of changes to zerocoin spend info.
  for (std::vector<std::pair<int64_t, libzerocoin::CoinDenomination>>::const_iterator it = denominations.begin(); it != denominations.end(); it++)
  {
  unsigned index = it - denominations.begin();
  