Remove support for multiple network protocols (#2005)

* Remove support multiple network protocols

* Address concerns

* Add back debug_asserts
This commit is contained in:
Pierre Krieger
2019-03-19 11:56:56 +01:00
committed by GitHub
parent 57387ef585
commit 002143d0a2
11 changed files with 452 additions and 733 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ use crossbeam_channel::{self as channel, Sender, select};
use futures::Future;
use futures::sync::{mpsc, oneshot};
use crate::message::{Message, ConsensusEngineId};
use network_libp2p::{NodeIndex, ProtocolId, PeerId};
use network_libp2p::{NodeIndex, PeerId};
use parity_codec::Encode;
use parking_lot::{Mutex, RwLock};
use primitives::{H256, ed25519::Public as AuthorityId};
@@ -554,7 +554,7 @@ pub trait TestNetFactory: Sized {
let tx_pool = Arc::new(EmptyTransactionPool);
let verifier = self.make_verifier(client.clone(), config);
let (block_import, justification_import, data) = self.make_block_import(client.clone());
let (network_sender, network_port) = network_channel(ProtocolId::default());
let (network_sender, network_port) = network_channel();
let import_queue = Box::new(BasicQueue::new(verifier, block_import, justification_import));
let status_sinks = Arc::new(Mutex::new(Vec::new()));