File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -499,7 +499,11 @@ impl TreeConfig {
499499
500500 /// Setter for the number of storage proof worker threads.
501501 pub const fn with_storage_worker_count ( mut self , storage_worker_count : usize ) -> Self {
502- self . storage_worker_count = storage_worker_count. max ( MIN_WORKER_COUNT ) ;
502+ self . storage_worker_count = if storage_worker_count > MIN_WORKER_COUNT {
503+ storage_worker_count
504+ } else {
505+ MIN_WORKER_COUNT
506+ } ;
503507 self
504508 }
505509
@@ -510,7 +514,11 @@ impl TreeConfig {
510514
511515 /// Setter for the number of account proof worker threads.
512516 pub const fn with_account_worker_count ( mut self , account_worker_count : usize ) -> Self {
513- self . account_worker_count = account_worker_count. max ( MIN_WORKER_COUNT ) ;
517+ self . account_worker_count = if account_worker_count > MIN_WORKER_COUNT {
518+ account_worker_count
519+ } else {
520+ MIN_WORKER_COUNT
521+ } ;
514522 self
515523 }
516524}
Original file line number Diff line number Diff line change 11//! clap [Args](clap::Args) for engine purposes
22
33use clap:: Args ;
4- use reth_engine_primitives:: { TreeConfig , DEFAULT_MULTIPROOF_TASK_CHUNK_SIZE , MIN_WORKER_COUNT } ;
4+ use reth_engine_primitives:: { TreeConfig , DEFAULT_MULTIPROOF_TASK_CHUNK_SIZE } ;
55
66use crate :: node_config:: {
77 DEFAULT_CROSS_BLOCK_CACHE_SIZE_MB , DEFAULT_MAX_PROOF_TASK_CONCURRENCY ,
@@ -111,18 +111,12 @@ pub struct EngineArgs {
111111
112112 /// Configure the number of storage proof workers in the Tokio blocking pool.
113113 /// If not specified, defaults to 2x available parallelism, clamped between 2 and 64.
114- #[ arg(
115- long = "engine.storage-worker-count" ,
116- value_parser = clap:: value_parser!( usize ) . range( MIN_WORKER_COUNT ..)
117- ) ]
114+ #[ arg( long = "engine.storage-worker-count" ) ]
118115 pub storage_worker_count : Option < usize > ,
119116
120117 /// Configure the number of account proof workers in the Tokio blocking pool.
121118 /// If not specified, defaults to 1.5x storage workers.
122- #[ arg(
123- long = "engine.account-worker-count" ,
124- value_parser = clap:: value_parser!( usize ) . range( MIN_WORKER_COUNT ..)
125- ) ]
119+ #[ arg( long = "engine.account-worker-count" ) ]
126120 pub account_worker_count : Option < usize > ,
127121}
128122
You can’t perform that action at this time.
0 commit comments