1
0

Move estimated_fee to Transaction class

It's not a function of the wallet but of the transaction
so it more naturally belongs there.
This commit is contained in:
Neil Booth
2015-11-28 21:28:54 +09:00
parent e9061ea371
commit 90dee43998
5 changed files with 14 additions and 16 deletions

View File

@@ -405,7 +405,7 @@ class Commands:
output = ('address', address, amount)
dummy_tx = Transaction.from_io(inputs, [output])
fee_per_kb = self.wallet.fee_per_kb(self.config)
fee = self.wallet.estimated_fee(dummy_tx, fee_per_kb)
fee = dummy_tx.estimated_fee(fee_per_kb)
amount -= fee
else:
amount = int(COIN*Decimal(amount))