diff --git a/substrate/client/network/src/protocol.rs b/substrate/client/network/src/protocol.rs index 9a8cfe7e1ffb4a4b82ec8e3d98c51246c4934e75..9e589330b7fbbc7abacdcbae80623e86fd05d573 100644 --- a/substrate/client/network/src/protocol.rs +++ b/substrate/client/network/src/protocol.rs @@ -1083,16 +1083,11 @@ impl<B: BlockT, H: ExHashT> Protocol<B, H> { let is_best = self.context_data.chain.info().best_hash == hash; debug!(target: "sync", "Reannouncing block {:?} is_best: {}", hash, is_best); - self.send_announcement(&header, data, is_best, true) - } - - fn send_announcement(&mut self, header: &B::Header, data: Vec<u8>, is_best: bool, force: bool) { - let hash = header.hash(); for (who, ref mut peer) in self.context_data.peers.iter_mut() { - trace!(target: "sync", "Announcing block {:?} to {}", hash, who); let inserted = peer.known_blocks.insert(hash); - if inserted || force { + if inserted { + trace!(target: "sync", "Announcing block {:?} to {}", hash, who); let message = message::BlockAnnounce { header: header.clone(), state: if is_best {