set initial trampoline fee level to 1 unless we are testing
This commit is contained in:
@@ -185,6 +185,8 @@ LNGOSSIP_FEATURES = BASE_FEATURES\
|
|||||||
|
|
||||||
class LNWorker(Logger, NetworkRetryManager[LNPeerAddr]):
|
class LNWorker(Logger, 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__(
|
||||||
@@ -1150,7 +1152,7 @@ class LNWallet(LNWorker):
|
|||||||
raise OnionRoutingFailure(code=OnionFailureCode.TRAMPOLINE_EXPIRY_TOO_SOON, data=b'')
|
raise OnionRoutingFailure(code=OnionFailureCode.TRAMPOLINE_EXPIRY_TOO_SOON, data=b'')
|
||||||
|
|
||||||
self.logs[payment_hash.hex()] = log = []
|
self.logs[payment_hash.hex()] = log = []
|
||||||
trampoline_fee_level = 0 # only used for trampoline payments
|
trampoline_fee_level = self.INITIAL_TRAMPOLINE_FEE_LEVEL
|
||||||
use_two_trampolines = True # only used for pay to legacy
|
use_two_trampolines = True # only used for pay to legacy
|
||||||
|
|
||||||
amount_inflight = 0 # what we sent in htlcs (that receiver gets, without fees)
|
amount_inflight = 0 # what we sent in htlcs (that receiver gets, without fees)
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ class MockWallet:
|
|||||||
class MockLNWallet(Logger, NetworkRetryManager[LNPeerAddr]):
|
class MockLNWallet(Logger, 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
|
||||||
TIMEOUT_SHUTDOWN_FAIL_PENDING_HTLCS = 0
|
TIMEOUT_SHUTDOWN_FAIL_PENDING_HTLCS = 0
|
||||||
|
INITIAL_TRAMPOLINE_FEE_LEVEL = 0
|
||||||
|
|
||||||
def __init__(self, *, local_keypair: Keypair, chans: Iterable['Channel'], tx_queue, name):
|
def __init__(self, *, local_keypair: Keypair, chans: Iterable['Channel'], tx_queue, name):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|||||||
Reference in New Issue
Block a user