removed unneeded config option

This commit is contained in:
Svyatoslav Nikolsky 2017-01-11 16:39:54 +03:00
parent d005307db9
commit 3bbd71009d
3 changed files with 2 additions and 6 deletions

View File

@ -98,8 +98,6 @@ pub fn create_local_sync_node(network: Magic, db: db::SharedStore, peers: PeersR
network: network,
// during regtests, peer is providing us with bad blocks => we shouldn't close connection because of this
close_connection_on_bad_block: network != Magic::Regtest,
// TODO: remove me
threads_num: 4,
};
let memory_pool = Arc::new(RwLock::new(MemoryPool::new()));

View File

@ -372,7 +372,7 @@ pub mod tests {
let sync_peers = Arc::new(PeersImpl::default());
let executor = DummyTaskExecutor::new();
let server = Arc::new(DummyServer::new());
let config = Config { network: Magic::Mainnet, threads_num: 1, close_connection_on_bad_block: true };
let config = Config { network: Magic::Mainnet, close_connection_on_bad_block: true };
let chain_verifier = Arc::new(ChainVerifier::new(storage.clone(), Magic::Mainnet));
let client_core = SynchronizationClientCore::new(config, sync_state.clone(), sync_peers.clone(), executor.clone(), chain, chain_verifier);
let mut verifier = match verifier {

View File

@ -82,8 +82,6 @@ pub struct Config {
pub network: Magic,
/// If true, connection to peer who has provided us with bad block is closed
pub close_connection_on_bad_block: bool,
/// Number of threads to allocate in synchronization CpuPool.
pub threads_num: usize,
}
/// Synchronization client.
@ -1248,7 +1246,7 @@ pub mod tests {
let memory_pool = Arc::new(RwLock::new(MemoryPool::new()));
let chain = Chain::new(storage.clone(), memory_pool.clone());
let executor = DummyTaskExecutor::new();
let config = Config { network: Magic::Mainnet, threads_num: 1, close_connection_on_bad_block: true };
let config = Config { network: Magic::Mainnet, close_connection_on_bad_block: true };
let chain_verifier = Arc::new(ChainVerifier::new(storage.clone(), Magic::Unitest));
let client_core = SynchronizationClientCore::new(config, sync_state.clone(), sync_peers.clone(), executor.clone(), chain, chain_verifier.clone());