File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -9380,6 +9380,10 @@ where
93809380 return Err(ChannelError::close("Peer sent a loose channel_reestablish not after reconnect".to_owned()));
93819381 }
93829382
9383+ // A node:
9384+ // - if `next_commitment_number` is zero:
9385+ // - MUST immediately fail the channel and broadcast any relevant latest commitment
9386+ // transaction.
93839387 if msg.next_local_commitment_number == 0
93849388 || msg.next_local_commitment_number >= INITIAL_COMMITMENT_NUMBER
93859389 || msg.next_remote_commitment_number >= INITIAL_COMMITMENT_NUMBER
@@ -9610,6 +9614,13 @@ where
96109614 let is_awaiting_remote_revoke = self.context.channel_state.is_awaiting_remote_revoke();
96119615 let next_counterparty_commitment_number = INITIAL_COMMITMENT_NUMBER - self.context.counterparty_next_commitment_transaction_number + if is_awaiting_remote_revoke { 1 } else { 0 };
96129616
9617+ // A node:
9618+ // - if `next_commitment_number` is 1 in both the `channel_reestablish` it
9619+ // sent and received:
9620+ // - MUST retransmit `channel_ready`.
9621+ // - otherwise:
9622+ // - MUST NOT retransmit `channel_ready`, but MAY send `channel_ready` with
9623+ // a different `short_channel_id` `alias` field.
96139624 let channel_ready = if msg.next_local_commitment_number == 1 && INITIAL_COMMITMENT_NUMBER - self.holder_commitment_point.next_transaction_number() == 1 {
96149625 // We should never have to worry about MonitorUpdateInProgress resending ChannelReady
96159626 self.get_channel_ready(logger)
You can’t perform that action at this time.
0 commit comments