From 080285cb95b923dc8399378f4574d61bc44b1636 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Fri, 27 Oct 2023 12:29:41 +0900 Subject: [PATCH] Adjust solana-core for cleaner scheduler-pr diff (#33881) --- core/src/replay_stage.rs | 4 +--- core/src/validator.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index 2c5c0ff9f..5cceb8dff 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -2786,7 +2786,6 @@ impl ReplayStage { match replay_result { Ok(replay_tx_count) => tx_count += replay_tx_count, Err(err) => { - // Error means the slot needs to be marked as dead Self::mark_dead_slot( blockstore, bank, @@ -2802,8 +2801,7 @@ impl ReplayStage { ancestor_hashes_replay_update_sender, purge_repair_slot_counter, ); - // If the bank was corrupted, don't try to run the below logic to check if the - // bank is completed + // don't try to run the below logic to check if the bank is completed continue; } } diff --git a/core/src/validator.rs b/core/src/validator.rs index ea67b7e6b..9dede099d 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -812,6 +812,12 @@ impl Validator { config.block_verification_method, config.block_production_method ); + let (replay_vote_sender, replay_vote_receiver) = unbounded(); + + // block min prioritization fee cache should be readable by RPC, and writable by validator + // (by both replay stage and banking stage) + let prioritization_fee_cache = Arc::new(PrioritizationFeeCache::default()); + let leader_schedule_cache = Arc::new(leader_schedule_cache); let entry_notification_sender = entry_notifier_service .as_ref() @@ -939,10 +945,6 @@ impl Validator { )), }; - // block min prioritization fee cache should be readable by RPC, and writable by validator - // (by both replay stage and banking stage) - let prioritization_fee_cache = Arc::new(PrioritizationFeeCache::default()); - let rpc_override_health_check = Arc::new(AtomicBool::new(config.rpc_config.disable_health_check)); let ( @@ -1229,7 +1231,6 @@ impl Validator { }; let last_vote = tower.last_vote(); - let (replay_vote_sender, replay_vote_receiver) = unbounded(); let tvu = Tvu::new( vote_account, authorized_voter_keypairs,