Browse Source
network: don't save negative ETA fee estimates
-1 means bitcoind could not give an estimate
3.3.3.1
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
3 changed files with
7 additions and
4 deletions
-
electrum/gui/qt/main_window.py
-
electrum/network.py
-
electrum/util.py
|
@ -1542,8 +1542,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
tx = self.wallet.make_unsigned_transaction( |
|
|
tx = self.wallet.make_unsigned_transaction( |
|
|
coins, outputs, self.config, fixed_fee=fee_estimator, |
|
|
coins, outputs, self.config, fixed_fee=fee_estimator, |
|
|
is_sweep=is_sweep) |
|
|
is_sweep=is_sweep) |
|
|
except NotEnoughFunds: |
|
|
except (NotEnoughFunds, NoDynamicFeeEstimates) as e: |
|
|
self.show_message(_("Insufficient funds")) |
|
|
self.show_message(str(e)) |
|
|
return |
|
|
return |
|
|
except BaseException as e: |
|
|
except BaseException as e: |
|
|
traceback.print_exc(file=sys.stdout) |
|
|
traceback.print_exc(file=sys.stdout) |
|
|
|
@ -357,8 +357,9 @@ class Network(PrintError): |
|
|
self.notify('fee_histogram') |
|
|
self.notify('fee_histogram') |
|
|
for i, task in fee_tasks: |
|
|
for i, task in fee_tasks: |
|
|
fee = int(task.result() * COIN) |
|
|
fee = int(task.result() * COIN) |
|
|
self.config.update_fee_estimates(i, fee) |
|
|
|
|
|
self.print_error("fee_estimates[%d]" % i, fee) |
|
|
self.print_error("fee_estimates[%d]" % i, fee) |
|
|
|
|
|
if fee < 0: continue |
|
|
|
|
|
self.config.update_fee_estimates(i, fee) |
|
|
self.notify('fee') |
|
|
self.notify('fee') |
|
|
|
|
|
|
|
|
def get_status_value(self, key): |
|
|
def get_status_value(self, key): |
|
|
|
@ -77,7 +77,9 @@ def base_unit_name_to_decimal_point(unit_name: str) -> int: |
|
|
raise UnknownBaseUnit(unit_name) from None |
|
|
raise UnknownBaseUnit(unit_name) from None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class NotEnoughFunds(Exception): pass |
|
|
class NotEnoughFunds(Exception): |
|
|
|
|
|
def __str__(self): |
|
|
|
|
|
return _("Insufficient funds") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class NoDynamicFeeEstimates(Exception): |
|
|
class NoDynamicFeeEstimates(Exception): |
|
|