From ff9d00ba1d145d5be240b30b3253598338864225 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 6 Mar 2017 21:05:48 +0100 Subject: [PATCH] minor fix: do_update_fee --- gui/qt/main_window.py | 6 ++++-- lib/wallet.py | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 73b1bbf5c..6b8e690ae 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -1152,18 +1152,20 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): except BaseException: return if not freeze_fee: - fee = None if self.not_enough_funds else self.wallet.get_tx_fee(tx) + fee = None if self.not_enough_funds else tx.get_fee() self.fee_e.setAmount(fee) if self.is_max: amount = tx.output_value() self.amount_e.setAmount(amount) + if fee is None: + return rbf_policy = self.config.get('rbf_policy', 1) if rbf_policy == 0: b = True elif rbf_policy == 1: - fee_rate = tx.get_fee() * 1000 / tx.estimated_size() + fee_rate = fee * 1000 / tx.estimated_size() try: c = self.config.reverse_dynfee(fee_rate) b = c in [-1, 25] diff --git a/lib/wallet.py b/lib/wallet.py index 73b6be98d..efd4a5821 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -789,10 +789,6 @@ class Abstract_Wallet(PrintError): # Change <= dust threshold is added to the tx fee return 182 * 3 * self.relayfee() / 1000 - def get_tx_fee(self, tx): - # this method can be overloaded - return tx.get_fee() - def make_unsigned_transaction(self, inputs, outputs, config, fixed_fee=None, change_addr=None): # check outputs i_max = None