message: merge wallet.cpp/h
diff: #include "utilmoneystr.h"
  #include "libzerocoin/Denominations.h"
  -
  +#include "reverse_iterate.h"
  #include <assert.h>
  #include <boost/algorithm/string/replace.hpp>
  using namespace std;
  -
  -/*
  - Template used for reverse iteration in C++11 range-based for loops.
  - std::vector<int> v = {1, 2, 3, 4, 5};
  - for (auto x : reverse_iterate(v))
  - std::cout << x << " ";
  - */
  -
  -template <typename T>
  -class reverse_range
  -{
  - T &x;
  -
  -public:
  - reverse_range(T &x) : x(x) {}
  -
  - auto begin() const -> decltype(this->x.rbegin())
  - {
  - return x.rbegin();
  - }
  -
  - auto end() const -> decltype(this->x.rend())
  - {
  - return x.rend();
  - }
  -};
  -
  -template <typename T>
  -reverse_range<T> reverse_iterate(T &x)
  -{
  - return reverse_range<T>(x);
  -}
  -
  /**
  * Settings
  */
  @@ -1289,6 +1256,7 @@ CAmount CWallet::GetZerocoinBalance() const
  }
  return nTotal;
  }
  +
  // Get a Map pairing the Denominations with the amount of Zerocoin for each Denomination
  std::map<libzerocoin::CoinDenomination, unsigned int> CWallet::GetZerocoinDenomAmounts() const
  {
  @@ -1321,6 +1289,7 @@ std::map<libzerocoin::CoinDenomination, CAmount> CWallet::GetMyZerocoinDistribut
  return spread;
  }
  +
  CAmount CWallet::GetAnonymizableBalance() const
  {
  if (fLiteMode) return 0;
  @@ -4039,6 +4008,7 @@ void CWallet::SelectMintsFromList(const CAmount nValueTarget, CAmount& nSelected
  LogPrintf("%s: Remaining %d, Fulfilled %d, Desired Amount %d\n", __func__, RemainingValue, nSelectedValue, nValueTarget);
  }
  +
  bool CWallet::CreateZerocoinSpendTransaction(CAmount nValue, CWalletTx& wtxNew, CReserveKey& reserveKey, vector<CZerocoinSpend>& vSpends,
  vector<CZerocoinMint>& vSelectedMints, std::string& strFailReason, bool fMintChange, CBitcoinAddress* address)
  {
  @@ -4147,7 +4117,7 @@ string CWallet::MintZerocoin(CScript pubCoin, int64_t nValue, CWalletTx& wtxNew,
  return _("Insufficient funds");
  CReserveKey reservekey(this);
  - int64_t nFeeRequired;
  + //int64_t nFeeRequired;
  if (IsLocked()) {
  string strError = _("Error: Wallet locked, unable to create transaction!");
  