From 4dd94172a6dc87a32bd6b0542c7c985f23afab1f Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 29 Mar 2022 20:22:09 +0200 Subject: [PATCH] config: fee slider: add more steps in mempool mode closes https://github.com/spesmilo/electrum/issues/6474 --- electrum/simple_config.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/electrum/simple_config.py b/electrum/simple_config.py index 387733727..b57591771 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -21,7 +21,8 @@ from .logging import get_logger, Logger FEE_ETA_TARGETS = [25, 10, 5, 2] -FEE_DEPTH_TARGETS = [10000000, 5000000, 2000000, 1000000, 500000, 200000, 100000] +FEE_DEPTH_TARGETS = [10_000_000, 5_000_000, 2_000_000, 1_000_000, + 800_000, 600_000, 400_000, 250_000, 100_000] FEE_LN_ETA_TARGET = 2 # note: make sure the network is asking for estimates for this target # satoshi per kbyte @@ -398,9 +399,11 @@ class SimpleConfig(Logger): break else: return 0 - # add one sat/byte as currently that is - # the max precision of the histogram - # (well, in case of ElectrumX at least. not for electrs) + # add one sat/byte as currently that is the max precision of the histogram + # note: precision depends on server. + # old ElectrumX <1.16 has 1 s/b prec, >=1.16 has 0.1 s/b prec. + # electrs seems to use untruncated double-precision floating points. + # # TODO decrease this to 0.1 s/b next time we bump the required protocol version fee += 1 # convert to sat/kbyte return int(fee * 1000)