fix: relayfee is per kb

This commit is contained in:
ThomasV 2016-06-04 09:33:26 +02:00
parent bdb4958a34
commit 9da2076328
2 changed files with 2 additions and 3 deletions

View File

@ -1194,7 +1194,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if use_rbf:
tx.set_sequence(0)
if tx.get_fee() < self.wallet.relayfee() and tx.requires_fee(self.wallet):
if tx.get_fee() < self.wallet.relayfee() * tx.estimated_size() / 1000 and tx.requires_fee(self.wallet):
self.show_error(_("This transaction requires a higher fee, or it will not be propagated by the network"))
return
@ -2716,7 +2716,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
vbox.addWidget(QLabel(_('Current fee') + ': %s'% self.format_amount(fee) + ' ' + self.base_unit()))
vbox.addWidget(QLabel(_('New Fee') + ': '))
e = BTCAmountEdit(self.get_decimal_point)
e.setAmount(fee + self.wallet.relayfee())
e.setAmount(fee *1.5)
vbox.addWidget(e)
vbox.addLayout(Buttons(CancelButton(d), OkButton(d)))
if not d.exec_():

View File

@ -1010,7 +1010,6 @@ class Abstract_Wallet(PrintError):
def estimate_fee(self, config, size):
fee = int(self.fee_per_kb(config) * size / 1000.)
fee = max(fee, self.relayfee())
return fee
def mktx(self, outputs, password, config, fee=None, change_addr=None, domain=None):