-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fundingmanager: when funding new channels, set a default max htlc
In this commit, we set a default max HTLC value in ChannelUpdates sent out for newly funded channels. As a result, we also default to setting `MessageFlags` equal to 1 in each new ChannelUpdate, since the max HTLC field is an optional field and MessageFlags indicates the presence of optional fields within the ChannelUpdate. For a default max HTLC, we choose the maximum msats worth of HTLCs that can be pending (or in-flight) on our side of the channel. The reason for this is because the spec specifies that the max HTLC present in a ChannelUpdate must be less than or equal to both total channel capacity and the maximum in-flight amount set by the peer. Since this in-flight value will always be less than or equal to channel capacity, it is a safe spec-compliant default. Co-authored-by: Johan T. Halseth <johanth@gmail.com>
- Loading branch information
1 parent
4f9de9b
commit a66a1e1
Showing
1 changed file
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters