remove unused original TestNet method

This commit is contained in:
keorn 2016-09-14 11:24:38 +02:00
parent 28a088eea7
commit 7eac946fdb

View File

@ -129,24 +129,6 @@ impl TestNet {
net
}
pub fn new_with_spec_file<R>(n: usize, reader: R) -> TestNet where R: Read + Clone {
let mut net = TestNet {
peers: Vec::new(),
started: false,
};
for _ in 0..n {
let chain = TestBlockChainClient::new_with_spec(Spec::load(reader.clone()).expect("Invalid spec file."));
let sync = ChainSync::new(SyncConfig::default(), &chain);
net.peers.push(TestPeer {
sync: RwLock::new(sync),
snapshot_service: Arc::new(TestSnapshotService::new()),
chain: chain,
queue: VecDeque::new(),
});
}
net
}
pub fn peer(&self, i: usize) -> &TestPeer {
self.peers.get(i).unwrap()
}