Skip to content

Commit

Permalink
use the RequestBlocksResponse message as separate
Browse files Browse the repository at this point in the history
  • Loading branch information
akichidis committed Jan 2, 2024
1 parent e616638 commit d87ed37
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mysticeti-core/src/synchronizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ where
}

if to_send.len() >= CHUNK_SIZE {
self.send(peer, NetworkMessage::Blocks(std::mem::take(&mut to_send)))?;
self.send(
peer,
NetworkMessage::RequestBlocksResponse(std::mem::take(&mut to_send)),
)?;
}

self.metrics
Expand All @@ -101,7 +104,10 @@ where

// send any leftovers
if !to_send.is_empty() {
self.send(peer, NetworkMessage::Blocks(std::mem::take(&mut to_send)))?;
self.send(
peer,
NetworkMessage::RequestBlocksResponse(std::mem::take(&mut to_send)),
)?;
}

self.send(peer, NetworkMessage::BlockNotFound(missing))
Expand Down

0 comments on commit d87ed37

Please sign in to comment.