electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 590659ff4dbd817ebbacd0f72ca4b266e2c435c1
parent b305dd4a8972710dc05a4e1a6677ddfea2efcca2
Author: ThomasV <thomasv@gitorious>
Date:   Mon, 15 Sep 2014 12:57:56 +0200

get_tx_fee

Diffstat:
Mgui/qt/main_window.py | 2+-
Mlib/wallet.py | 4++++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -952,7 +952,7 @@ class ElectrumWindow(QMainWindow): tx = self.wallet.make_unsigned_transaction(outputs, fee, coins = self.get_coins()) self.not_enough_funds = (tx is None) if not is_fee: - fee = tx.get_fee() if tx else None + fee = self.wallet.get_tx_fee(tx) if tx else None self.fee_e.setAmount(fee) self.payto_e.textChanged.connect(lambda:text_edited(False)) diff --git a/lib/wallet.py b/lib/wallet.py @@ -693,6 +693,10 @@ class Abstract_Wallet(object): return default_label + def get_tx_fee(self, tx): + # this method can be overloaded + return tx.get_fee() + def estimated_fee(self, tx): estimated_size = len(tx.serialize(-1))/2 fee = int(self.fee_per_kb*estimated_size/1000.)