transaction: re-raise NetworkException in add_info_from_network
What changed, and why it matters
This is a bug-fix patch for the Electrum Bitcoin wallet. It corrects a logic error where a network failure was being silently swallowed instead of being reported, which could cause the wallet's fee-bumping feature to crash later with a confusing error. There is no indication this allows theft, remote code execution, or unauthorized access; it is a reliability and user-experience fix.
Treat as a normal reliability bug fix. No urgent security response is indicated by the commit content. If backporting, verify that callers of `add_info_from_network` handle `NetworkException` appropriately when `ignore_network_issues=False`.
Security signals we found
Error-handling logic flaw (exception swallowing)
Crash/DoS-like symptom in fee-bumping UI path
No input validation, cryptographic, or authorization change
Evidence from the diff
The commit changes Transaction.add_info_from_network in electrum/transaction.py so that a NetworkException is re-raised when ignore_network_issues=False. Previously the exception was caught and logged, causing add_info_from_wallet_and_network to return True even though network-required transaction data was missing. That incorrect success state then led QETxRbfFeeBumper / Abstract_Wallet.bump_fee() to raise Exception("tx missing info from network"). The patch restores proper error propagation so callers can handle network failures correctly.
Changed components
electrum/transaction.pyTransaction.add_info_from_networkTransaction.add_info_from_wallet_and_networkQETxRbfFeeBumper / bump_fee workflowInspect captured patch +3 / −0
diff --git a/electrum/transaction.py b/electrum/transaction.py
index 82d1126..94d4063 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))
Why this scored 21/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.