zpay32: Change min_final_cltv_expiry_delta. #8308
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We already do not allow a
min_final_cltv_expiry_delta
for invoices lower than 18 and default to 80 when not specified:https:/lightningnetwork/lnd/blob/master/lnrpc/invoicesrpc/addinvoice.go#L364-L380.
Lately during a chat with CDecker we found out that CLN will not always provide a
min_cltv_expiry_delta
in their invoice. In that case we would default to 9 when paying the invoice which hower CLN would reject because the delta is too low for them.So this PR is mostly to smoothen out some interoperability issues between CLN<=>LND
For more infos see: https:/lightning/bolts/blob/master/02-peer-protocol.md#cltv_expiry_delta-selection
Hmm looking at https:/lightningnetwork/lnd/blob/master/lncfg/config.go we might analyse all our constants because I think we are still at an old spec level.
For example:
But I think now the value is also at 18:
what do you think ?