From 61dce275557eb47f64eb0210b6faee01ed42ae46 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Wed, 14 Feb 2024 22:34:06 +0900 Subject: [PATCH] Warn if the flag was ignored --- core/src/validator.rs | 6 ++++++ ledger-tool/src/ledger_utils.rs | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/src/validator.rs b/core/src/validator.rs index e008bffff7602e..243c3abf1fc526 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -815,6 +815,12 @@ impl Validator { match &config.block_verification_method { BlockVerificationMethod::BlockstoreProcessor => { info!("no scheduler pool is installed for block verification..."); + if let Some(count) = config.unified_scheduler_handler_threads { + warn!( + "--unified-scheduler-handler-threads={count} is ignored because unified \ + scheduler is disabled" + ); + } } BlockVerificationMethod::UnifiedScheduler => { let scheduler_pool = DefaultSchedulerPool::new_dyn( diff --git a/ledger-tool/src/ledger_utils.rs b/ledger-tool/src/ledger_utils.rs index e170fae640e09d..12e3d5cba9a7ca 100644 --- a/ledger-tool/src/ledger_utils.rs +++ b/ledger-tool/src/ledger_utils.rs @@ -291,13 +291,19 @@ pub fn load_and_process_ledger( "Using: block-verification-method: {}", block_verification_method, ); + let unified_scheduler_handler_threads = + value_t!(arg_matches, "unified_scheduler_handler_threads", usize).ok(); match block_verification_method { BlockVerificationMethod::BlockstoreProcessor => { info!("no scheduler pool is installed for block verification..."); + if let Some(count) = unified_scheduler_handler_threads { + warn!( + "--unified-scheduler-handler-threads={count} is ignored because unified \ + scheduler is disabled" + ); + } } BlockVerificationMethod::UnifiedScheduler => { - let unified_scheduler_handler_threads = - value_t!(arg_matches, "unified_scheduler_handler_threads", usize).ok(); let no_transaction_status_sender = None; let no_replay_vote_sender = None; let ignored_prioritization_fee_cache = Arc::new(PrioritizationFeeCache::new(0u64));