diff --git a/electrum/address_synchronizer.py b/electrum/address_synchronizer.py index bf78878d5..87dc7bb49 100644 --- a/electrum/address_synchronizer.py +++ b/electrum/address_synchronizer.py @@ -757,6 +757,7 @@ class AddressSynchronizer(Logger, EventListener): incorrectly early-exit and return None, e.g. for not-all-ismine-input txs, where we could calculate the fee if we deserialized (but to see if we have all the parent txs available, we would have to deserialize first). + More expensive but more complete alternative: wallet.get_tx_info(tx).fee """ # check if stored fee is available fee = self.db.get_tx_fee(txid, trust_server=False) diff --git a/electrum/gui/qml/qetxfinalizer.py b/electrum/gui/qml/qetxfinalizer.py index 7e4e6938a..76e03b4d3 100644 --- a/electrum/gui/qml/qetxfinalizer.py +++ b/electrum/gui/qml/qetxfinalizer.py @@ -755,7 +755,7 @@ class QETxCpfpFeeBumper(TxFeeSlider, TxMonMixin): return self._parent_tx_size = self._parent_tx.estimated_size() - self._parent_fee = self._wallet.wallet.adb.get_tx_fee(self._txid) + self._parent_fee = self._wallet.wallet.get_tx_info(self._parent_tx).fee if self._parent_fee is None: self._logger.error(_("Can't CPFP: unknown fee for parent transaction.")) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 9426d74df..5565a0f99 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -2546,7 +2546,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): total_size = parent_tx.estimated_size() + new_tx.estimated_size() parent_txid = parent_tx.txid() assert parent_txid - parent_fee = self.wallet.adb.get_tx_fee(parent_txid) + parent_fee = self.wallet.get_tx_info(parent_tx).fee if parent_fee is None: self.show_error(_("Can't CPFP: unknown fee for parent transaction.")) return