diff --git a/src/wallet/txlist.cpp b/src/wallet/txlist.cpp index 385d3d19f..773fa3602 100644 --- a/src/wallet/txlist.cpp +++ b/src/wallet/txlist.cpp @@ -62,6 +62,10 @@ void TxList::List(std::vector& tx_records, const CWalletTx& wtx, CAmount nDebit = wtx.GetDebit(filter_ismine); CAmount nNet = nCredit - nDebit; + if (nCredit == 0 && nDebit == 0) { + return; + } + if (nNet > 0 || wtx.IsCoinBase() || wtx.IsHogEx()) { // Credit List_Credit(tx_records, wtx, filter_ismine); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 26208b21b..44fbca7fc 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1313,7 +1313,7 @@ void CWallet::blockConnected(const CBlock& block, int height) if (!block.mweb_block.IsNull()) { mw::Coin coin; for (const mw::Hash& spent_id : block.mweb_block.GetSpentIDs()) { - if (GetCoin(spent_id, coin) && !IsSpent(spent_id)) { + if (GetCoin(spent_id, coin) && coin.IsMine() && !IsSpent(spent_id)) { AddToWallet( MakeTransactionRef(), boost::make_optional(spent_id), @@ -1382,7 +1382,7 @@ void CWallet::blockDisconnected(const CBlock& block, int height) if (!block.mweb_block.IsNull()) { mw::Coin coin; for (const mw::Hash& spent_id : block.mweb_block.GetSpentIDs()) { - if (GetCoin(spent_id, coin)) { + if (GetCoin(spent_id, coin) && coin.IsMine()) { std::pair range = mapTxSpends.equal_range(spent_id); // MWEB: We just choose the first spend. In the future, we may need a better approach for handling conflicted txs if (range.first != range.second) {