This commit is contained in:
桥下红药
2026-01-27 22:55:20 +08:00
parent ded86baf13
commit f7e44114c0
3 changed files with 149 additions and 133 deletions
+1 -1
View File
@@ -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));
+3
View File
@@ -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,
}
}
}