Skip to content
Open
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
6 changes: 4 additions & 2 deletions lean_client/networking/src/network/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1692,8 +1692,10 @@ where

if count == 0 || count > req_resp::MAX_REQUEST_BLOCKS as u64 {
info!(peer = %peer, start_slot, count, "Rejecting BlocksByRange: invalid count");
// Send an empty response — peer will treat as no data.
let response = LeanResponse::BlocksByRange(Vec::new());
let response = LeanResponse::Error {
code: req_resp::RESPONSE_INVALID_REQUEST,
message: "invalid_count".to_string(),
};
if let Err(e) = self
.swarm
.behaviour_mut()
Expand Down
Loading