Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Remove blocking sync -> import-queue operations #1818

Merged
merged 12 commits into from
Feb 28, 2019
Prev Previous commit
Next Next commit
remove add_peer imple in grandpa, fix typo
  • Loading branch information
gterzian committed Feb 25, 2019
commit f15cc0e618bf3594b308a7443fcda8cb417487a9
11 changes: 0 additions & 11 deletions core/finality-grandpa/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ impl TestNetFactory for GrandpaTestNet {
(shared_import.clone(), Some(shared_import), Mutex::new(Some(link)))
}

fn add_peer(&mut self, config: &ProtocolConfig) {
let client = Arc::new(test_client::new());
let verifier = self.make_verifier(client.clone(), config);
let (block_import, justification_import, data) = self.make_block_import(client.clone());
let specialization = DummySpecialization;
let peer = create_peer(client, block_import, justification_import, data, verifier, specialization, config);
self.mut_peers(|peers| {
peers.push(peer)
});
}

fn peer(&self, i: usize) -> &GrandpaPeer {
&self.peers[i]
}
Expand Down
2 changes: 1 addition & 1 deletion core/network/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub enum ProtocolMsg<B: BlockT, S: NetworkSpecialization<B>,> {
Peers(Sender<Vec<(NodeIndex, PeerInfo<B>)>>),
/// Let protocol know a peer is currenlty clogged.
PeerClogged(NodeIndex, Option<Message<B>>),
/// A batch of blocks have been processed, with or without errors.
/// A batch of blocks has been processed, with or without errors.
BlocksProcessed(Vec<B::Hash>, bool),
/// Tell protocol to restart sync.
RestartSync,
Expand Down