From 6211e656a8cbdc9b4ab31b127e94bce6523f92d3 Mon Sep 17 00:00:00 2001 From: Janus Date: Fri, 2 Nov 2018 14:30:12 +0100 Subject: [PATCH] lnwatcher: do not get_transaction before broadcast this workaround was inserted to avoid losing the interface when rebroadcasting a transaction already in the mempool many times. but since the network should make sure we always have a interface ready, and this problem shouldn't happen on mainnet, remove the workaround --- electrum/lnwatcher.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py index dd4f1d7a9..5e4136928 100644 --- a/electrum/lnwatcher.py +++ b/electrum/lnwatcher.py @@ -182,7 +182,7 @@ class LNWatcher(PrintError): encumbered_sweep_txns = self.sweepstore[funding_outpoint][prev_txid] if len(encumbered_sweep_txns) == 0: if self.get_tx_mined_depth(prev_txid) == TxMinedDepth.DEEP: - self.print_error(e_tx.name, 'have no follow-up transactions and prevtx mined deep, returning') + self.print_error('have no follow-up transactions and prevtx', prev_txid, 'mined deep, returning') return False # check if any response applies keep_watching_this = False @@ -225,13 +225,6 @@ class LNWatcher(PrintError): height = self.addr_sync.get_tx_height(e_tx.tx.txid()).height if height != TX_HEIGHT_LOCAL: return - try: - await self.network.get_transaction(e_tx.tx.txid()) - except: - pass - else: - self.print_error('already published, returning') - return try: txid = await self.network.broadcast_transaction(e_tx.tx) except Exception as e: