]> git.bitcoin.ninja Git - rust-lightning/commit
Clean up error messages and conditionals in reestablish handling
authorMatt Corallo <git@bluematt.me>
Thu, 9 Nov 2023 03:28:45 +0000 (03:28 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 27 Nov 2023 23:59:12 +0000 (23:59 +0000)
commitf24830719af671f2998a42c3ce248147e94fe0d2
tree775aa69dc05fd302c5df8d3524ae0774a5fe0624
parent589a88e7498590050bdf202b525b8e227a6322de
Clean up error messages and conditionals in reestablish handling

When we reestablish there are generally always 4 conditions for
both local and remote commitment transactions:
 * we're stale and have possibly lost data
 * we're ahead and the peer has lost data
 * we're caught up
 * we're nearly caught up and need to retransmit one update.

In especially the local commitment case we had a mess of different
comparisons, which is improved here. Further, the error messages
are clarified and include more information.
lightning/src/ln/channel.rs