lnpeer: increase max_accepted_htlcs (5->30)
Counter-intuitively, the motivation is to be able to *send* more htlcs, for MPP trickery. We don't offer more htlcs than this limit, to be conservative with what we send, and to interoperate with clightning. defaults of other clients: eclair: 30 clightning: 30 lnd: 483
This commit is contained in:
@@ -781,6 +781,7 @@ class Channel(AbstractChannel):
|
||||
if len(self.hm.htlcs_by_direction(htlc_receiver, direction=RECEIVED, ctn=ctn)) + 1 > chan_config.max_accepted_htlcs:
|
||||
raise PaymentFailure('Too many HTLCs already in channel')
|
||||
# however, c-lightning is a lot stricter, so extra checks:
|
||||
# https://github.com/ElementsProject/lightning/blob/4dcd4ca1556b13b6964a10040ba1d5ef82de4788/channeld/full_channel.c#L581
|
||||
if strict:
|
||||
max_concurrent_htlcs = min(self.config[htlc_proposer].max_accepted_htlcs,
|
||||
self.config[htlc_receiver].max_accepted_htlcs)
|
||||
|
||||
Reference in New Issue
Block a user