From 6b0236445796062343fb8f0b2ad66a97a8c9debb Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 5 Jun 2024 19:38:33 +0200 Subject: [PATCH] follow-up 444b3f3e17f5b29248ad88c7c37b1080ea97626c: if we bump the fee of a claim tx, we must broadcast because add_transaction will fail --- electrum/submarine_swaps.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py index e463bc6bd..448e8da54 100644 --- a/electrum/submarine_swaps.py +++ b/electrum/submarine_swaps.py @@ -382,6 +382,11 @@ class SwapManager(Logger): self.logger.info(f'adding claim tx {tx.txid()}') self.wallet.adb.add_transaction(tx) swap.spending_txid = tx.txid() + if funding_height.conf > 0 or (swap.is_reverse and self.wallet.config.LIGHTNING_ALLOW_INSTANT_SWAPS): + try: + await self.network.broadcast_transaction(tx) + except TxBroadcastServerReturnedError: + self.logger.info(f'error broadcasting claim tx {txin.spent_txid}') def get_claim_fee(self): return self.get_fee(CLAIM_FEE_SIZE)