From e8eee065a503c7fd6ac2622395dc9ddb1911f7ba Mon Sep 17 00:00:00 2001 From: f321x Date: Mon, 9 Mar 2026 13:45:19 +0100 Subject: [PATCH] transaction: re-raise NetworkException in add_info_from_network `Transaction.add_info_from_network` would swallow a `NetworkException` even when `ignore_network_issues=False` is passed. This causes `Transaction.add_info_from_wallet_and_network` to incorrectly return True even if the operation failed. If `QETxRbfFeeBumper` then incorrectly proceeds assuming the call was successful `Abstract_Wallet.bump_fee()` would raise an `Exception("tx missing info from network")`. Should fix the traceback in https://github.com/spesmilo/electrum/issues/5502#issuecomment-4021308427. --- electrum/transaction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/transaction.py b/electrum/transaction.py index 82d11268e..94d40630d 100644 --- a/electrum/transaction.py +++ b/electrum/transaction.py @@ -1269,6 +1269,7 @@ class Transaction: timeout=None, ) -> None: """note: it is recommended to call add_info_from_wallet first, as this can save some network requests""" + from .interface import NetworkException if not self.is_missing_info_from_network(): return if progress_cb is None: @@ -1302,6 +1303,8 @@ class Transaction: except Exception as e: has_errored = True _logger.error(f"tx.add_info_from_network() got exc: {e!r}") + if isinstance(e, NetworkException) and not ignore_network_issues: + raise finally: has_finished = True progress_cb(TxinDataFetchProgress(num_tasks_done, num_tasks_total, has_errored, has_finished))