Merge pull request #10514 from f321x/fix_bump_fee_exc

transaction: re-raise NetworkException in add_info_from_network
This commit is contained in:
ghost43
2026-03-09 15:26:08 +00:00
committed by GitHub
2 changed files with 18 additions and 2 deletions
+15 -2
View File
@@ -659,7 +659,7 @@ class QETxRbfFeeBumper(TxFeeSlider, TxMonMixin):
super().__init__(parent)
self._oldfee = QEAmount()
self._oldfee_rate = 0
self._oldfee_rate = '0'
self._orig_tx = None
self._rbf = True
self._bump_method = BumpFeeStrategy.PRESERVE_PAYMENT.name
@@ -758,6 +758,13 @@ class QETxRbfFeeBumper(TxFeeSlider, TxMonMixin):
self.validChanged.emit()
self.warning = _("The new fee rate needs to be higher than the old fee rate.")
return
if not self._orig_tx.add_info_from_wallet_and_network(wallet=self._wallet.wallet, show_error=self._logger.error):
self._valid = False
self.validChanged.emit()
self.warning = _("Transaction is missing info from network")
return
try:
self._tx = self._wallet.wallet.bump_fee(
tx=self._orig_tx,
@@ -793,7 +800,7 @@ class QETxCanceller(TxFeeSlider, TxMonMixin):
super().__init__(parent)
self._oldfee = QEAmount()
self._oldfee_rate = 0
self._oldfee_rate = '0'
self._orig_tx = None
self._txid = ''
self._rbf = True
@@ -877,6 +884,12 @@ class QETxCanceller(TxFeeSlider, TxMonMixin):
self.warning = messages.MSG_RELAYFEE
return
if not self._orig_tx.add_info_from_wallet_and_network(wallet=self._wallet.wallet, show_error=self._logger.error):
self._valid = False
self.validChanged.emit()
self.warning = _("Transaction is missing info from network")
return
try:
self._tx = self._wallet.wallet.dscancel(
tx=self._orig_tx,
+3
View File
@@ -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))