SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
4 additions and
3 deletions
-
electrum/lnbase.py
-
electrum/simple_config.py
|
|
@ -1052,9 +1052,9 @@ class Peer(PrintError): |
|
|
|
await self.update_channel(chan, "update_fee", channel_id=chan.channel_id, feerate_per_kw=feerate_per_kw) |
|
|
|
|
|
|
|
def current_feerate_per_kw(self): |
|
|
|
from .simple_config import FEE_LN_ETA_TARGET, FEERATE_FALLBACK_STATIC_FEE, FEERATE_REGTEST_HARDCODED |
|
|
|
if constants.net is constants.BitcoinRegtest: |
|
|
|
return 45000 |
|
|
|
from .simple_config import FEE_LN_ETA_TARGET, FEERATE_FALLBACK_STATIC_FEE |
|
|
|
return FEERATE_REGTEST_HARDCODED // 4 |
|
|
|
feerate_per_kvbyte = self.network.config.eta_target_to_fee(FEE_LN_ETA_TARGET) |
|
|
|
if feerate_per_kvbyte is None: |
|
|
|
feerate_per_kvbyte = FEERATE_FALLBACK_STATIC_FEE |
|
|
|
|
|
@ -28,6 +28,7 @@ FEERATE_FALLBACK_STATIC_FEE = 150000 |
|
|
|
FEERATE_DEFAULT_RELAY = 1000 |
|
|
|
FEERATE_STATIC_VALUES = [1000, 2000, 5000, 10000, 20000, 30000, |
|
|
|
50000, 70000, 100000, 150000, 200000, 300000] |
|
|
|
FEERATE_REGTEST_HARDCODED = 180000 # for eclair compat |
|
|
|
|
|
|
|
|
|
|
|
config = None |
|
|
@ -511,7 +512,7 @@ class SimpleConfig(Logger): |
|
|
|
fee_level: float between 0.0 and 1.0, representing fee slider position |
|
|
|
""" |
|
|
|
if constants.net is constants.BitcoinRegtest: |
|
|
|
return 45000 |
|
|
|
return FEERATE_REGTEST_HARDCODED |
|
|
|
if dyn is None: |
|
|
|
dyn = self.is_dynfee() |
|
|
|
if mempool is None: |
|
|
|