Skip to content

Commit

Permalink
doc: update BOLT quotes (to include same-transmission-order rule).
Browse files Browse the repository at this point in the history
We implement this, but now we have an appropriate quote!

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Feb 22, 2021
1 parent c83f426 commit 535f647
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CCANDIR := ccan

# Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/
BOLTVERSION := dcf6b0f359c230ef140e336011890c96eea576fa
BOLTVERSION := 920e51986d654b78d1ec2afc18152c9986f52a9d

-include config.vars

Expand Down
12 changes: 10 additions & 2 deletions channeld/channeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -2409,6 +2409,10 @@ static void peer_reconnect(struct peer *peer,
* 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`.
* - if it has previously sent a `commitment_signed` that needs to be
* retransmitted:
* - MUST retransmit `revoke_and_ack` and `commitment_signed` in the
* same relative order as initially transmitted.
* - otherwise:
* - if `next_revocation_number` is not equal to 1 greater
* than the commitment number of the last `revoke_and_ack` the
Expand Down Expand Up @@ -2504,8 +2508,12 @@ static void peer_reconnect(struct peer *peer,
? NULL
: &remote_current_per_commitment_point);

/* We have to re-send in the same order we sent originally:
* revoke_and_ack (usually) alters our next commitment. */
/* BOLT #2:
* - if it has previously sent a `commitment_signed` that needs to be
* retransmitted:
* - MUST retransmit `revoke_and_ack` and `commitment_signed` in the
* same relative order as initially transmitted.
*/
if (retransmit_revoke_and_ack && !peer->last_was_revoke)
resend_revoke(peer);

Expand Down

0 comments on commit 535f647

Please sign in to comment.