move INITIAL_TRAMPOLINE_FEE_LEVEL to config
This commit is contained in:
@@ -233,8 +233,6 @@ LNGOSSIP_FEATURES = (
|
|||||||
|
|
||||||
class LNWorker(Logger, EventListener, NetworkRetryManager[LNPeerAddr]):
|
class LNWorker(Logger, EventListener, NetworkRetryManager[LNPeerAddr]):
|
||||||
|
|
||||||
INITIAL_TRAMPOLINE_FEE_LEVEL = 1 # only used for trampoline payments. set to 0 in tests.
|
|
||||||
|
|
||||||
def __init__(self, xprv, features: LnFeatures):
|
def __init__(self, xprv, features: LnFeatures):
|
||||||
Logger.__init__(self)
|
Logger.__init__(self)
|
||||||
NetworkRetryManager.__init__(
|
NetworkRetryManager.__init__(
|
||||||
@@ -1456,7 +1454,7 @@ class LNWallet(LNWorker):
|
|||||||
self._paysessions[payment_key] = paysession = PaySession(
|
self._paysessions[payment_key] = paysession = PaySession(
|
||||||
payment_hash=payment_hash,
|
payment_hash=payment_hash,
|
||||||
payment_secret=payment_secret,
|
payment_secret=payment_secret,
|
||||||
initial_trampoline_fee_level=self.INITIAL_TRAMPOLINE_FEE_LEVEL,
|
initial_trampoline_fee_level=self.config.INITIAL_TRAMPOLINE_FEE_LEVEL,
|
||||||
invoice_features=invoice_features,
|
invoice_features=invoice_features,
|
||||||
r_tags=r_tags,
|
r_tags=r_tags,
|
||||||
min_cltv_expiry=min_cltv_expiry,
|
min_cltv_expiry=min_cltv_expiry,
|
||||||
|
|||||||
@@ -979,6 +979,7 @@ Note you are at risk of losing the funds in the swap, if the funding transaction
|
|||||||
|
|
||||||
This will result in longer routes; it might increase your fees and decrease the success rate of your payments."""),
|
This will result in longer routes; it might increase your fees and decrease the success rate of your payments."""),
|
||||||
)
|
)
|
||||||
|
INITIAL_TRAMPOLINE_FEE_LEVEL = ConfigVar('initial_trampoline_fee_level', default=1, type_=int)
|
||||||
|
|
||||||
EXPERIMENTAL_LN_FORWARD_PAYMENTS = ConfigVar('lightning_forward_payments', default=False, type_=bool)
|
EXPERIMENTAL_LN_FORWARD_PAYMENTS = ConfigVar('lightning_forward_payments', default=False, type_=bool)
|
||||||
EXPERIMENTAL_LN_FORWARD_TRAMPOLINE_PAYMENTS = ConfigVar('lightning_forward_trampoline_payments', default=False, type_=bool)
|
EXPERIMENTAL_LN_FORWARD_TRAMPOLINE_PAYMENTS = ConfigVar('lightning_forward_trampoline_payments', default=False, type_=bool)
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ class MockLNWallet(Logger, EventListener, NetworkRetryManager[LNPeerAddr]):
|
|||||||
MPP_EXPIRY = 2 # HTLC timestamps are cast to int, so this cannot be 1
|
MPP_EXPIRY = 2 # HTLC timestamps are cast to int, so this cannot be 1
|
||||||
PAYMENT_TIMEOUT = 120
|
PAYMENT_TIMEOUT = 120
|
||||||
TIMEOUT_SHUTDOWN_FAIL_PENDING_HTLCS = 0
|
TIMEOUT_SHUTDOWN_FAIL_PENDING_HTLCS = 0
|
||||||
INITIAL_TRAMPOLINE_FEE_LEVEL = 0
|
|
||||||
MPP_SPLIT_PART_FRACTION = 1 # this disables the forced splitting
|
MPP_SPLIT_PART_FRACTION = 1 # this disables the forced splitting
|
||||||
MPP_SPLIT_PART_MINAMT_MSAT = 5_000_000
|
MPP_SPLIT_PART_MINAMT_MSAT = 5_000_000
|
||||||
|
|
||||||
@@ -178,6 +177,7 @@ class MockLNWallet(Logger, EventListener, NetworkRetryManager[LNPeerAddr]):
|
|||||||
self.downstream_htlc_to_upstream_peer_map = {}
|
self.downstream_htlc_to_upstream_peer_map = {}
|
||||||
self.hold_invoice_callbacks = {}
|
self.hold_invoice_callbacks = {}
|
||||||
self.payment_bundles = [] # lists of hashes. todo:persist
|
self.payment_bundles = [] # lists of hashes. todo:persist
|
||||||
|
self.config.INITIAL_TRAMPOLINE_FEE_LEVEL = 0
|
||||||
|
|
||||||
self.logger.info(f"created LNWallet[{name}] with nodeID={local_keypair.pubkey.hex()}")
|
self.logger.info(f"created LNWallet[{name}] with nodeID={local_keypair.pubkey.hex()}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user