remove unused original TestNet method
This commit is contained in:
parent
28a088eea7
commit
7eac946fdb
@ -129,24 +129,6 @@ impl TestNet {
|
|||||||
net
|
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 {
|
pub fn peer(&self, i: usize) -> &TestPeer {
|
||||||
self.peers.get(i).unwrap()
|
self.peers.get(i).unwrap()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user