Skip to content

Commit df80eb0

Browse files
committed
Retransmit commitment_signed before tx_signatures
During channel reestablishment, both commitment_signed and tx_signatures messages may be retransmitted. However, commitment_signed must come first, so re-arrange the ordering. This moves tx_abort as well to keep the interactive tx messages together.
1 parent d8f421e commit df80eb0

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8944,19 +8944,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
89448944
msg,
89458945
});
89468946
}
8947-
// TODO(dual_funding): For async signing support we need to hold back `tx_signatures` until the `commitment_signed` is ready.
8948-
if let Some(msg) = tx_signatures {
8949-
pending_msg_events.push(MessageSendEvent::SendTxSignatures {
8950-
node_id: counterparty_node_id,
8951-
msg,
8952-
});
8953-
}
8954-
if let Some(msg) = tx_abort {
8955-
pending_msg_events.push(MessageSendEvent::SendTxAbort {
8956-
node_id: counterparty_node_id,
8957-
msg,
8958-
});
8959-
}
89608947

89618948
macro_rules! handle_cs { () => {
89628949
if let Some(update) = commitment_update {
@@ -8986,6 +8973,20 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
89868973
},
89878974
}
89888975

8976+
// TODO(dual_funding): For async signing support we need to hold back `tx_signatures` until the `commitment_signed` is ready.
8977+
if let Some(msg) = tx_signatures {
8978+
pending_msg_events.push(MessageSendEvent::SendTxSignatures {
8979+
node_id: counterparty_node_id,
8980+
msg,
8981+
});
8982+
}
8983+
if let Some(msg) = tx_abort {
8984+
pending_msg_events.push(MessageSendEvent::SendTxAbort {
8985+
node_id: counterparty_node_id,
8986+
msg,
8987+
});
8988+
}
8989+
89898990
if let Some(tx) = funding_broadcastable {
89908991
if channel.context.is_manual_broadcast() {
89918992
log_info!(logger, "Not broadcasting funding transaction with txid {} as it is manually managed", tx.compute_txid());

0 commit comments

Comments
 (0)