gui: Avoid TransactionRecord instance for IsMine outputs

Github-Pull: bitcoin/bitcoin #12578
Rebased-From: 82dd3e0ffa0af629a34b28ed7eca4027e0376756
This commit is contained in:
João Barbosa 2018-03-01 17:39:42 +00:00 committed by Gregory Sanders
parent ec62262c51
commit 41c8d4c89c

View file

@ -110,9 +110,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface
for (unsigned int nOut = 0; nOut < wtx.tx->vout.size(); nOut++)
{
const CTxOut& txout = wtx.tx->vout[nOut];
TransactionRecord sub(hash, nTime);
sub.idx = nOut;
sub.involvesWatchAddress = involvesWatchAddress;
if(wtx.txout_is_mine[nOut])
{
@ -121,6 +118,10 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface
continue;
}
TransactionRecord sub(hash, nTime);
sub.idx = nOut;
sub.involvesWatchAddress = involvesWatchAddress;
if (!boost::get<CNoDestination>(&wtx.txout_address[nOut]))
{
// Sent to Bitcoin Address