mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
follow-up #4324
This commit is contained in:
parent
150cbb5d9c
commit
f12798e91c
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue