message: Update transaction decomposition for PoS
diff: */
  bool TransactionRecord::showTransaction(const CWalletTx &wtx)
  {
  - if (wtx.IsCoinBase())
  + if (wtx.IsCoinBase() || wtx.IsCoinStake())
  {
  // Ensures we show generated coins / mined transactions at depth 1
  if (!wtx.IsInMainChain())
  @@ -42,7 +42,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
  uint256 hash = wtx.GetHash();
  std::map<std::string, std::string> mapValue = wtx.mapValue;
  - if (nNet > 0 || wtx.IsCoinBase())
  + if (nNet > 0 || wtx.IsCoinBase() || wtx.IsCoinStake())
  {
  //
  // Credit
  @@ -55,8 +55,16 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
  {
  TransactionRecord sub(hash, nTime);
  CTxDestination address;
  + if(wtx.IsCoinStake()) // Combine into single output for coinstake
  + {
  + sub.idx = 1; // vout index
  + sub.credit = nNet;
  + }
  + else
  + {
  sub.idx = i; // vout index
  sub.credit = txout.nValue;
  + }
  sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;
  if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address))
  {
  @@ -70,13 +78,16 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
  sub.type = TransactionRecord::RecvFromOther;
  sub.address = mapValue["from"];
  }
  - if (wtx.IsCoinBase())
  + if (wtx.IsCoinBase() || wtx.IsCoinStake())
  {
  // Generated
  sub.type = TransactionRecord::Generated;
  }
  parts.append(sub);
  +
  + if(wtx.IsCoinStake())
  + break; // Single output for coinstake
  }
  }
  }
  @@ -182,7 +193,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
  // Sort order, unrecorded transactions sort to the top
  status.sortKey = strprintf("%010d-%01d-%010u-%03d",
  (pindex ? pindex->nHeight : std::numeric_limits<int>::max()),
  - (wtx.IsCoinBase() ? 1 : 0),
  + ((wtx.IsCoinBase() || wtx.IsCoinStake()) ? 1 : 0),
  wtx.nTimeReceived,
  idx);
  status.countsForBalance = wtx.IsTrusted() && !(wtx.GetBlocksToMaturity() > 0);
  