1
0

more accurate computation of transaction fees.

This commit is contained in:
thomasv
2013-03-23 09:23:57 +01:00
parent f3a1a57a78
commit a5168cc09f
5 changed files with 34 additions and 7 deletions

View File

@@ -795,6 +795,10 @@ class ElectrumWindow(QMainWindow):
self.show_message(str(e))
return
if tx.requires_fee(self.wallet.verifier) and fee == 0:
QMessageBox.warning(self, _('Error'), _("This transaction requires a fee, or it will not be propagated by the network."), _('OK'))
return
self.run_hook('send_tx', tx)
if label:
@@ -1928,8 +1932,8 @@ class ElectrumWindow(QMainWindow):
fee_e = QLineEdit()
fee_e.setText("%s"% str( Decimal( self.wallet.fee)/100000000 ) )
grid_wallet.addWidget(fee_e, 0, 2)
msg = _('Fee per transaction input. Transactions involving multiple inputs tend to require a higher fee.') + ' ' \
+ _('Recommended value') + ': 0.001'
msg = _('Fee per kilobyte of transaction.') + ' ' \
+ _('Recommended value') + ': 0.0001'
grid_wallet.addWidget(HelpButton(msg), 0, 3)
fee_e.textChanged.connect(lambda: numbify(fee_e,False))
if not self.config.is_modifiable('fee'):

View File

@@ -198,7 +198,7 @@ def run_settings_dialog(wallet, parent):
fee_entry.connect('changed', numbify, False)
fee_entry.show()
fee.pack_start(fee_entry,False,False, 10)
add_help_button(fee, 'Fee per transaction input. Transactions involving multiple inputs tend to have a higher fee. Recommended value:0.0005')
add_help_button(fee, 'Fee per kilobyte of transaction. Recommended value:0.0001')
fee.show()
vbox.pack_start(fee, False,False, 5)
@@ -843,6 +843,11 @@ class ElectrumWindow:
except BaseException, e:
self.show_message(str(e))
return
if tx.requires_fee(self.wallet.verifier) and fee == 0:
self.show_message( "This transaction requires a fee, or it will not be propagated by the network." )
return
if label:
self.wallet.labels[tx.hash()] = label