Skip to content

Commit

Permalink
removed accidental key press
Browse files Browse the repository at this point in the history
  • Loading branch information
bayk committed Dec 26, 2024
1 parent 835173d commit 01febb5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions servers/src/common/adapters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,18 +388,22 @@ where
// Probably child block doesn't exist, let's request them
if let Some(peer) = self.peers().get_connected_peer(&peer_info.addr) {
let head = chain.head()?;
debug!("Got unknown header, requesting headers from the peer {} at height {}",peer_info.addr, head.height);
debug!(
"Got unknown header, requesting headers from the peer {} at height {}",
peer_info.addr, head.height
);
let heights = get_locator_heights(head.height);
let locator = chain.get_locator_hashes(head, &heights)?;
let _ = peer.send_header_request(locator);

if let Ok(tip) = chain.head() {
// Requesting of orphans buffer is large enough to finish the job with request
if bh.height.saturating_sub(tip.height) < chain.get_pibd_params().get_orphans_num_limit() as u64 {
if bh.height.saturating_sub(tip.height)
< chain.get_pibd_params().get_orphans_num_limit() as u64
{
let _ = peer.send_block_request(bh.hash(), chain::Options::NONE);
}`
}
}

}
}
return Err(e);
Expand Down

0 comments on commit 01febb5

Please sign in to comment.