-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lnpeer.reestablish_chan: enforce order of replaying commitsig/revack
When replaying messages during channel-reestablishment, previously we first resent all update messages, along with potential commitment_signed messages, and then we potentially resent a single revoke_and_ack. This can result in incorrect behaviour in case both a commitment_signed and a revoke_and_ack needs to be resent. When replaying messages, the relative order of commitment_signed and revoke_and_messages needs to be preserved. (the order of updates (htlc/fee) in relation to the revack messages does not matter) implements lightning/bolts#810 The logic here is somewhat based on what c-lightning does: https://github.com/ElementsProject/lightning/blob/01e5f1886e31816e652f417a1ff789a26aaeec3b/channeld/channeld.c#L3059
- Loading branch information
1 parent
7e8dc04
commit 1efa4f5
Showing
3 changed files
with
187 additions
and
24 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
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
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