You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During splicing, commitment_signed messages need to be collected into a
single batch before they are handled. Rather than including this as part
of the channel state machine logic, batch when reading messages from the
wire since they can be considered one logical message.
log_debug!(logger,"Peer {} sent batched commitment_signed for the wrong channel (expected: {}, actual: {})", log_pubkey!(their_node_id), channel_id,&msg.channel_id);
1775
+
returnErr(PeerHandleError{}.into());
1776
+
}
1777
+
1778
+
constCOMMITMENT_SIGNED_BATCH_LIMIT:usize = 100;
1779
+
if buffer.len() == COMMITMENT_SIGNED_BATCH_LIMIT{
1780
+
log_debug!(logger,"Peer {} sent batched commitment_signed for channel {} exceeding the limit", log_pubkey!(their_node_id), channel_id);
log_debug!(logger,"Peer {} sent batched commitment_signed with duplicate funding_txid {} for channel {}", log_pubkey!(their_node_id), channel_id,&batch.funding_txid);
1789
+
returnErr(PeerHandleError{}.into());
1790
+
}
1791
+
}
1792
+
1793
+
if buffer.len() >= batch_size {
1794
+
let(channel_id, batch) = peer_lock.commitment_signed_batch.take().expect("batch should have been inserted");
log_debug!(logger,"Peer {} sent non-batched commitment_signed for channel {} when expecting batched commitment_signed", log_pubkey!(their_node_id),&msg.channel_id);
0 commit comments