Browse Source

follow-up #4324

3.2.x
SomberNight 7 years ago
parent
commit
f12798e91c
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      lib/simple_config.py

5
lib/simple_config.py

@ -9,7 +9,7 @@ from copy import deepcopy
from . import util
from .util import (user_dir, print_error, PrintError,
NoDynamicFeeEstimates, format_fee_satoshis)
NoDynamicFeeEstimates, format_fee_satoshis, quantize_feerate)
from .i18n import _
FEE_ETA_TARGETS = [25, 10, 5, 2]
@ -476,6 +476,9 @@ class SimpleConfig(PrintError):
def estimate_fee_for_feerate(cls, fee_per_kb, size):
fee_per_kb = Decimal(fee_per_kb)
fee_per_byte = fee_per_kb / 1000
# to be consistent with what is displayed in the GUI,
# the calculation needs to use the same precision:
fee_per_byte = quantize_feerate(fee_per_byte)
return round(fee_per_byte * size)
def update_fee_estimates(self, key, value):

Loading…
Cancel
Save