message: [RPC][Zerocoin] update listmintedzerocoins
  use serial hash (instead of pubcoin hash) for non-Verbose output as that is the data required by 'spendzerocoinmints'
  sort the output by descending confirmations number
diff: #include <veil/ringct/transactionrecord.h>
  #include <wallet/wallet.h>
  #include <wallet/walletdb.h>
  +#include <veil/zerocoin/denomination_functions.h>
  #include <veil/zerocoin/mintmeta.h>
  #include <txmempool.h>
  @@ -490,7 +491,7 @@ UniValue listmintedzerocoins(const JSONRPCRequest& request)
  "\nResult (with fVerbose=false):\n"
  "[\n"
  - " \"xxx\" (string) Pubcoin in hex format.\n"
  + " \"xxx\" (string) mint serial hash in hex format.\n"
  " ,...\n"
  "]\n"
  @@ -523,27 +524,31 @@ UniValue listmintedzerocoins(const JSONRPCRequest& request)
  set<CMintMeta> setMints = pwallet->ListMints(true, fMatureOnly, true);
  + // sort the mints by descending confirmations
  + std::list<CMintMeta> listMints(setMints.begin(), setMints.end());
  + listMints.sort(oldest_first);
  +
  int nBestHeight = chainActive.Height();
  UniValue jsonList(UniValue::VARR);
  if (fVerbose) {
  - for (const CMintMeta& m : setMints) {
  + for (const CMintMeta& m : listMints) {
  // Construct mint object
  UniValue objMint(UniValue::VOBJ);
  - objMint.push_back(Pair("serial hash", m.hashSerial.GetHex())); // Serial hash
  - objMint.push_back(Pair("version", m.nVersion)); // Zerocoin version
  - objMint.push_back(Pair("zerocoin ID", m.hashPubcoin.GetHex())); // PubCoin
  + objMint.push_back(Pair("serial hash", m.hashSerial.GetHex()));
  + objMint.push_back(Pair("version", m.nVersion));
  + objMint.push_back(Pair("zerocoin ID", m.hashPubcoin.GetHex()));
  int denom = libzerocoin::ZerocoinDenominationToInt(m.denom);
  - objMint.push_back(Pair("denomination", denom)); // Denomination
  + objMint.push_back(Pair("denomination", denom));
  int nConfirmations = (m.nHeight && nBestHeight > m.nHeight) ? nBestHeight - m.nHeight : 0;
  - objMint.push_back(Pair("confirmations", nConfirmations)); // Confirmations
  + objMint.push_back(Pair("confirmations", nConfirmations));
  // Push back mint object
  jsonList.push_back(objMint);
  }
  } else {
  - for (const CMintMeta& m : setMints)
  + for (const CMintMeta& m : listMints)
  // Push back PubCoin
  - jsonList.push_back(m.hashPubcoin.GetHex());
  + jsonList.push_back(m.hashSerial.GetHex());
  }
  return jsonList;
  }
  