From 01febb5c6a7b685ec641cd82f53f013cd52b4eea Mon Sep 17 00:00:00 2001 From: bayk Date: Thu, 26 Dec 2024 15:03:08 -0800 Subject: [PATCH] removed accidental key press --- servers/src/common/adapters.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/servers/src/common/adapters.rs b/servers/src/common/adapters.rs index 976bfbdc2..21b0b305e 100644 --- a/servers/src/common/adapters.rs +++ b/servers/src/common/adapters.rs @@ -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);