1
0
Files
electrum/electrum/tests
SomberNight ef4477a930 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 https://github.com/lightning/bolts/pull/810

The logic here is somewhat based on what c-lightning does:
01e5f1886e/channeld/channeld.c (L3059)
2022-05-25 19:44:44 +02:00
..
2022-04-20 12:48:22 +02:00
2022-03-07 10:36:20 +01:00
2021-04-30 19:55:47 +02:00
2022-05-24 02:39:11 +00:00
2020-02-04 13:35:58 +01:00
2021-06-22 19:24:16 +02:00
2020-02-25 20:45:17 +01:00