From 0ef7235147ab0e28b8cea9236c37859ef7de5eed Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 16 Jan 2025 09:50:20 +0100 Subject: [PATCH] swaps: ignore exceptions in publish_offers nostr may temporarily raise an exception; we don't want to kill the taskgroup --- electrum/submarine_swaps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py index b9cd0f80f..0d30b0bcf 100644 --- a/electrum/submarine_swaps.py +++ b/electrum/submarine_swaps.py @@ -24,7 +24,7 @@ from .bitcoin import (script_to_p2wsh, opcodes, construct_witness) from .transaction import PartialTxInput, PartialTxOutput, PartialTransaction, Transaction, TxInput, TxOutpoint from .transaction import script_GetOp, match_script_against_template, OPPushDataGeneric, OPPushDataPubkey -from .util import log_exceptions, BelowDustLimit, OldTaskGroup, age +from .util import log_exceptions, ignore_exceptions, BelowDustLimit, OldTaskGroup, age from .lnutil import REDEEM_AFTER_DOUBLE_SPENT_DELAY from .bitcoin import dust_threshold, DummyAddress from .logging import Logger @@ -1379,6 +1379,7 @@ class NostrTransport(Logger): max_amount = offer['max_amount'], ) + @ignore_exceptions @log_exceptions async def publish_offer(self, sm): assert self.sm.is_server