From d81610b2e110c14250bec1ede47fedbe85152ce3 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 10 Jun 2022 10:19:47 +0200 Subject: [PATCH] wallet: filter non-wallet transactions before rebroadcasting event --- electrum/wallet.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/electrum/wallet.py b/electrum/wallet.py index 637d3ac34..13664b100 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -431,6 +431,10 @@ class Abstract_Wallet(ABC): tx = self.db.get_transaction(tx_hash) if not tx: raise Exception(tx_hash) + is_mine = any([self.is_mine(out.address) for out in tx.outputs()]) + is_mine |= any([self.is_mine(self.adb.get_txin_address(txin)) for txin in tx.inputs()]) + if not is_mine: + return self._maybe_set_tx_label_based_on_invoices(tx) if self.lnworker: self.lnworker.maybe_add_backup_from_tx(tx)