commit b6393cbdf2215b500bd1506122e995b6a91b745f
parent 9cc76bc969e8029567828758725f52c2cad7a1f7
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 15 Jun 2016 13:31:24 +0200
display 'low fee' in tx dialog
Diffstat:
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gui/kivy/uix/dialogs/tx_dialog.py b/gui/kivy/uix/dialogs/tx_dialog.py
@@ -112,7 +112,7 @@ class TxDialog(Factory.Popup):
if timestamp:
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
elif exp_n:
- self.date_str = _('Within %d blocks') % exp_n
+ self.date_str = _('Within %d blocks') % exp_n if exp_n > 0 else _('unknown (low fee)')
else:
self.date_str = ''
diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py
@@ -203,7 +203,8 @@ class TxDialog(QDialog, MessageBoxMixin):
self.date_label.setText(_("Date: %s")%time_str)
self.date_label.show()
elif exp_n:
- self.date_label.setText(_('Expected confirmation time: %d blocks'%(exp_n)))
+ text = '%d blocks'%(exp_n) if exp_n > 0 else _('unknown (low fee)')
+ self.date_label.setText(_('Expected confirmation time') + ': ' + text)
self.date_label.show()
else:
self.date_label.hide()
diff --git a/lib/network.py b/lib/network.py
@@ -353,6 +353,8 @@ class Network(util.DaemonThread):
import operator
dist = map(lambda x: (x[0], abs(x[1] - fee_per_kb)), self.fee_estimates.items())
min_target, min_value = min(dist, key=operator.itemgetter(1))
+ if fee_per_kb < self.fee_estimates.get(25)/2:
+ min_target = -1
return min_target
def notify(self, key):