From 0aeab14f75f44422e33218710bebff53aee64ce5 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 22 Nov 2018 09:52:50 +0000 Subject: [PATCH] GUI: Ignore explicit fee output when determining if a transaction is send-to-self --- src/qt/transactionrecord.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index e8cd8a408c..a487adbe7e 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -85,8 +85,13 @@ QList TransactionRecord::decomposeTransaction(const interface } isminetype fAllToMe = ISMINE_SPENDABLE; - for (const isminetype mine : wtx.txout_is_mine) - { + for (unsigned int i = 0; i < wtx.txout_is_mine.size(); ++i) { + const isminetype mine = wtx.txout_is_mine[i]; + const CTxOut txout = wtx.tx->vout[i]; + if (txout.IsFee()) { + // explicit fee; ignore + continue; + } if(mine & ISMINE_WATCH_ONLY) involvesWatchAddress = true; if(fAllToMe > mine) fAllToMe = mine; }