Files
pallectrum/electrum
SomberNight 140d2d0247 lnpeer: fix timing issues in reestablish_channel, for dataloss case
Assume Alice and Bob have a channel, and Alice is on an old state,
but neither of them knows the latter yet.
Timing scenarios:
1. Alice sends reest first, and Bob receives it before sending reest himself
  - old code: Bob realises Alice is behind, Bob will force-close,
              Bob won't send reest to Alice, so Alice does not learn she is behind
  - new code: Bob realises Alice is behind, Bob will force-close,
              Bob will still send reest to Alice, so Alice learns she is behind.
2. Bob sends reest first, and Alice receives it before sending reest herself
  - old code: Alice learns she is behind. Alice won't send reest to Bob,
              so Bob does not learn he is ahead, so Bob won't force-close.
  - new code: Alice learns she is behind. Alice will still send reest to Bob
              though with ctn=0 instead of actual. Bob learns he is ahead, so
              Bob will force close.
3. Alice and Bob both send reest, and then they both receive what the other sent
  - no change: Alice and Bob both learn Alice is behind. Bob will force-close.
2024-01-15 20:13:34 +00:00
..
2023-11-13 10:47:18 +01:00
2023-12-22 11:03:58 +01:00
2023-12-04 14:15:39 +08:00
2023-12-04 14:15:39 +08:00
2023-12-04 14:15:39 +08:00
2024-01-11 17:29:42 +00:00