mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix: relayfee is per kb
This commit is contained in:
parent
bdb4958a34
commit
9da2076328
2 changed files with 2 additions and 3 deletions
|
@ -1194,7 +1194,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
if use_rbf:
|
if use_rbf:
|
||||||
tx.set_sequence(0)
|
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"))
|
self.show_error(_("This transaction requires a higher fee, or it will not be propagated by the network"))
|
||||||
return
|
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(_('Current fee') + ': %s'% self.format_amount(fee) + ' ' + self.base_unit()))
|
||||||
vbox.addWidget(QLabel(_('New Fee') + ': '))
|
vbox.addWidget(QLabel(_('New Fee') + ': '))
|
||||||
e = BTCAmountEdit(self.get_decimal_point)
|
e = BTCAmountEdit(self.get_decimal_point)
|
||||||
e.setAmount(fee + self.wallet.relayfee())
|
e.setAmount(fee *1.5)
|
||||||
vbox.addWidget(e)
|
vbox.addWidget(e)
|
||||||
vbox.addLayout(Buttons(CancelButton(d), OkButton(d)))
|
vbox.addLayout(Buttons(CancelButton(d), OkButton(d)))
|
||||||
if not d.exec_():
|
if not d.exec_():
|
||||||
|
|
|
@ -1010,7 +1010,6 @@ class Abstract_Wallet(PrintError):
|
||||||
|
|
||||||
def estimate_fee(self, config, size):
|
def estimate_fee(self, config, size):
|
||||||
fee = int(self.fee_per_kb(config) * size / 1000.)
|
fee = int(self.fee_per_kb(config) * size / 1000.)
|
||||||
fee = max(fee, self.relayfee())
|
|
||||||
return fee
|
return fee
|
||||||
|
|
||||||
def mktx(self, outputs, password, config, fee=None, change_addr=None, domain=None):
|
def mktx(self, outputs, password, config, fee=None, change_addr=None, domain=None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue