Browse Source

channeld: fix incorrect comment on reestablish.

We quote BOLT 2 on *local* above the *remote* checks (we quote it
again below when we do the local checks).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
28977435a3
  1. 22
      channeld/channel.c

22
channeld/channel.c

@ -1901,16 +1901,18 @@ static void peer_reconnect(struct peer *peer)
/* BOLT #2:
*
* - if `next_local_commitment_number` is equal to the commitment
* number of the last `commitment_signed` message the receiving node
* has sent:
* - MUST reuse the same commitment number for its next
* `commitment_signed`.
* - otherwise:
* - if `next_local_commitment_number` is not 1 greater than the
* commitment number of the last `commitment_signed` message the
* receiving node has sent:
* - SHOULD fail the channel.
* - if `next_remote_revocation_number` is equal to the commitment
* number of the last `revoke_and_ack` the receiving node sent, AND
* the receiving node hasn't already received a `closing_signed`:
* - MUST re-send the `revoke_and_ack`.
* - otherwise:
* - if `next_remote_revocation_number` is not equal to 1 greater
* than the commitment number of the last `revoke_and_ack` the
* receiving node has sent:
* - SHOULD fail the channel.
* - if it has not sent `revoke_and_ack`, AND
* `next_remote_revocation_number` is equal to 0:
* - SHOULD fail the channel.
*/
if (next_remote_revocation_number == peer->next_index[LOCAL] - 2) {
/* Don't try to retransmit revocation index -1! */

Loading…
Cancel
Save