Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions lightning/src/ln/peer_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2204,8 +2204,8 @@ where
.into());
}

const COMMITMENT_SIGNED_BATCH_LIMIT: usize = 20;
if batch_size > COMMITMENT_SIGNED_BATCH_LIMIT {
const BATCH_SIZE_LIMIT: usize = 20;
if batch_size > BATCH_SIZE_LIMIT {
let error = format!(
"Peer {} sent start_batch for channel {} exceeding the limit",
log_pubkey!(their_node_id),
Expand All @@ -2227,19 +2227,13 @@ where
MessageBatchImpl::CommitmentSigned(messages)
},
_ => {
let error = format!(
"Peer {} sent start_batch for channel {} without a known message type",
log_debug!(
logger,
"Peer {} sent start_batch for channel {} without a known message type; ignoring",
log_pubkey!(their_node_id),
&msg.channel_id
&msg.channel_id,
);
log_debug!(logger, "{}", error);
return Err(LightningError {
err: error.clone(),
action: msgs::ErrorAction::DisconnectPeerWithWarning {
msg: msgs::WarningMessage { channel_id: msg.channel_id, data: error },
},
}
.into());
return Ok(None);
},
};

Expand Down
Loading