update
This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ impl DHTServer {
|
||||
|
||||
let node_queue = ShardedNodeQueue::new(options.node_queue_capacity);
|
||||
|
||||
let (hash_tx, hash_rx) = mpsc::channel::<HashDiscovered>(10000);
|
||||
let (hash_tx, hash_rx) = mpsc::channel::<HashDiscovered>(options.hash_queue_capacity);
|
||||
|
||||
let fetcher = Arc::new(RbitFetcher::new(options.metadata_timeout));
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ pub struct DHTOptions {
|
||||
pub netmode: NetMode,
|
||||
|
||||
pub node_queue_capacity: usize,
|
||||
|
||||
pub hash_queue_capacity: usize,
|
||||
}
|
||||
|
||||
impl Default for DHTOptions {
|
||||
@@ -78,6 +80,7 @@ impl Default for DHTOptions {
|
||||
max_metadata_worker_count: 1000,
|
||||
netmode: NetMode::Ipv4Only,
|
||||
node_queue_capacity: 100000,
|
||||
hash_queue_capacity: 10000,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user