diff --git a/core/src/cache_block_time_service.rs b/core/src/cache_block_time_service.rs index 9959b11f46611a..8874cc78bb1125 100644 --- a/core/src/cache_block_time_service.rs +++ b/core/src/cache_block_time_service.rs @@ -1,18 +1,20 @@ -use crossbeam_channel::{Receiver, RecvTimeoutError, Sender}; -use solana_ledger::blockstore::Blockstore; -use solana_measure::measure::Measure; -use solana_runtime::bank::Bank; -use std::{ - sync::{ - atomic::{AtomicBool, Ordering}, - Arc, +pub use solana_ledger::blockstore_processor::CacheBlockTimeSender; +use { + crossbeam_channel::{Receiver, RecvTimeoutError}, + solana_ledger::blockstore::Blockstore, + solana_measure::measure::Measure, + solana_runtime::bank::Bank, + std::{ + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, + thread::{self, Builder, JoinHandle}, + time::Duration, }, - thread::{self, Builder, JoinHandle}, - time::Duration, }; pub type CacheBlockTimeReceiver = Receiver>; -pub type CacheBlockTimeSender = Sender>; pub struct CacheBlockTimeService { thread_hdl: JoinHandle<()>, diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index 7896b736a67684..9fca17c2c16c92 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -378,7 +378,8 @@ impl ReplayStage { &my_pubkey, &vote_account, &mut progress, - transaction_status_sender.clone(), + transaction_status_sender.as_ref(), + cache_block_time_sender.as_ref(), &verify_recyclers, &mut heaviest_subtree_fork_choice, &replay_vote_sender, @@ -576,7 +577,6 @@ impl ReplayStage { &subscriptions, &block_commitment_cache, &mut heaviest_subtree_fork_choice, - &cache_block_time_sender, &bank_notification_sender, &mut gossip_duplicate_confirmed_slots, &mut unfrozen_gossip_verified_vote_hashes, @@ -1216,7 +1216,7 @@ impl ReplayStage { bank: &Arc, blockstore: &Blockstore, bank_progress: &mut ForkProgress, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, replay_vote_sender: &ReplayVoteSender, verify_recyclers: &VerifyRecyclers, ) -> result::Result { @@ -1323,7 +1323,6 @@ impl ReplayStage { subscriptions: &Arc, block_commitment_cache: &Arc>, heaviest_subtree_fork_choice: &mut HeaviestSubtreeForkChoice, - cache_block_time_sender: &Option, bank_notification_sender: &Option, gossip_duplicate_confirmed_slots: &mut GossipDuplicateConfirmedSlots, unfrozen_gossip_verified_vote_hashes: &mut UnfrozenGossipVerifiedVoteHashes, @@ -1360,12 +1359,6 @@ impl ReplayStage { blockstore .set_roots(&rooted_slots) .expect("Ledger set roots failed"); - Self::cache_block_times( - blockstore, - bank_forks, - &rooted_slots, - cache_block_time_sender, - ); let highest_confirmed_root = Some( block_commitment_cache .read() @@ -1659,7 +1652,8 @@ impl ReplayStage { my_pubkey: &Pubkey, vote_account: &Pubkey, progress: &mut ProgressMap, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, + cache_block_time_sender: Option<&CacheBlockTimeSender>, verify_recyclers: &VerifyRecyclers, heaviest_subtree_fork_choice: &mut HeaviestSubtreeForkChoice, replay_vote_sender: &ReplayVoteSender, @@ -1723,7 +1717,7 @@ impl ReplayStage { &bank, &blockstore, bank_progress, - transaction_status_sender.clone(), + transaction_status_sender, replay_vote_sender, verify_recyclers, ); @@ -1758,7 +1752,7 @@ impl ReplayStage { ); did_complete_bank = true; info!("bank frozen: {}", bank.slot()); - if let Some(transaction_status_sender) = transaction_status_sender.clone() { + if let Some(transaction_status_sender) = transaction_status_sender { transaction_status_sender.send_transaction_status_freeze_message(&bank); } bank.freeze(); @@ -1784,6 +1778,7 @@ impl ReplayStage { .send(BankNotification::Frozen(bank.clone())) .unwrap_or_else(|err| warn!("bank_notification_sender failed: {:?}", err)); } + blockstore_processor::cache_block_time(&bank, cache_block_time_sender); let bank_hash = bank.hash(); if let Some(new_frozen_voters) = @@ -2477,36 +2472,6 @@ impl ReplayStage { } } - fn cache_block_times( - blockstore: &Arc, - bank_forks: &Arc>, - rooted_slots: &[Slot], - cache_block_time_sender: &Option, - ) { - if let Some(cache_block_time_sender) = cache_block_time_sender { - for slot in rooted_slots { - if blockstore - .get_block_time(*slot) - .unwrap_or_default() - .is_none() - { - if let Some(rooted_bank) = bank_forks.read().unwrap().get(*slot) { - cache_block_time_sender - .send(rooted_bank.clone()) - .unwrap_or_else(|err| { - warn!("cache_block_time_sender failed: {:?}", err) - }); - } else { - error!( - "rooted_bank {:?} not available in BankForks; block time not cached", - slot - ); - } - } - } - } - } - pub fn get_unlock_switch_vote_slot(cluster_type: ClusterType) -> Slot { match cluster_type { ClusterType::Development => 0, @@ -3404,7 +3369,7 @@ pub(crate) mod tests { &bank, &mut entries, true, - Some(TransactionStatusSender { + Some(&TransactionStatusSender { sender: transaction_status_sender, enable_cpi_and_log_storage: false, }), diff --git a/core/src/retransmit_stage.rs b/core/src/retransmit_stage.rs index 0b6777c937da8e..9f9ba13855f413 100644 --- a/core/src/retransmit_stage.rs +++ b/core/src/retransmit_stage.rs @@ -693,7 +693,7 @@ mod tests { ..ProcessOptions::default() }; let (bank_forks, cached_leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); let leader_schedule_cache = Arc::new(cached_leader_schedule); let bank_forks = Arc::new(RwLock::new(bank_forks)); diff --git a/core/src/validator.rs b/core/src/validator.rs index f35ae0996223a4..c830ddab3ccc5e 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -1119,7 +1119,10 @@ fn new_banks_from_ledger( process_options, transaction_history_services .transaction_status_sender - .clone(), + .as_ref(), + transaction_history_services + .cache_block_time_sender + .as_ref(), ) .unwrap_or_else(|err| { error!("Failed to load ledger: {:?}", err); diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 2abcff6901edb7..3e0d86bbffb46d 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -703,6 +703,7 @@ fn load_bank_forks( snapshot_config.as_ref(), process_options, None, + None, ) } diff --git a/ledger/src/bank_forks_utils.rs b/ledger/src/bank_forks_utils.rs index de2d6f24c25d97..22c68df22f9341 100644 --- a/ledger/src/bank_forks_utils.rs +++ b/ledger/src/bank_forks_utils.rs @@ -1,8 +1,8 @@ use crate::{ blockstore::Blockstore, blockstore_processor::{ - self, BlockstoreProcessorError, BlockstoreProcessorResult, ProcessOptions, - TransactionStatusSender, + self, BlockstoreProcessorError, BlockstoreProcessorResult, CacheBlockTimeSender, + ProcessOptions, TransactionStatusSender, }, entry::VerifyRecyclers, leader_schedule_cache::LeaderScheduleCache, @@ -36,7 +36,8 @@ pub fn load( shrink_paths: Option>, snapshot_config: Option<&SnapshotConfig>, process_options: ProcessOptions, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, + cache_block_time_sender: Option<&CacheBlockTimeSender>, ) -> LoadResult { if let Some(snapshot_config) = snapshot_config.as_ref() { info!( @@ -96,6 +97,7 @@ pub fn load( &process_options, &VerifyRecyclers::default(), transaction_status_sender, + cache_block_time_sender, ), Some(deserialized_snapshot_hash), ); @@ -113,6 +115,7 @@ pub fn load( &blockstore, account_paths, process_options, + cache_block_time_sender, ), None, ) diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index 0b33fb15ad1df0..ff816312a6590b 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -1712,10 +1712,11 @@ impl Blockstore { } pub fn cache_block_time(&self, slot: Slot, timestamp: UnixTimestamp) -> Result<()> { - if !self.is_root(slot) { - return Err(BlockstoreError::SlotNotRooted); + if self.get_block_time(slot).unwrap_or_default().is_none() { + self.blocktime_cf.put(slot, ×tamp) + } else { + Ok(()) } - self.blocktime_cf.put(slot, ×tamp) } pub fn get_first_available_block(&self) -> Result { diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index cd3e688127b24f..1eb3c64b9f6c69 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -101,7 +101,7 @@ fn get_first_error( fn execute_batch( batch: &TransactionBatch, bank: &Arc, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, replay_vote_sender: Option<&ReplayVoteSender>, timings: &mut ExecuteTimings, ) -> Result<()> { @@ -163,7 +163,7 @@ fn execute_batches( bank: &Arc, batches: &[TransactionBatch], entry_callback: Option<&ProcessCallback>, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, replay_vote_sender: Option<&ReplayVoteSender>, timings: &mut ExecuteTimings, ) -> Result<()> { @@ -173,12 +173,12 @@ fn execute_batches( thread_pool.borrow().install(|| { batches .into_par_iter() - .map_with(transaction_status_sender, |sender, batch| { + .map(|batch| { let mut timings = ExecuteTimings::default(); let result = execute_batch( batch, bank, - sender.clone(), + transaction_status_sender, replay_vote_sender, &mut timings, ); @@ -207,7 +207,7 @@ pub fn process_entries( bank: &Arc, entries: &mut [Entry], randomize: bool, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, replay_vote_sender: Option<&ReplayVoteSender>, ) -> Result<()> { let mut timings = ExecuteTimings::default(); @@ -232,7 +232,7 @@ fn process_entries_with_callback( entries: &mut [EntryType], randomize: bool, entry_callback: Option<&ProcessCallback>, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, replay_vote_sender: Option<&ReplayVoteSender>, timings: &mut ExecuteTimings, ) -> Result<()> { @@ -253,7 +253,7 @@ fn process_entries_with_callback( bank, &batches, entry_callback, - transaction_status_sender.clone(), + transaction_status_sender, replay_vote_sender, timings, )?; @@ -304,7 +304,7 @@ fn process_entries_with_callback( bank, &batches, entry_callback, - transaction_status_sender.clone(), + transaction_status_sender, replay_vote_sender, timings, )?; @@ -376,6 +376,7 @@ pub fn process_blockstore( blockstore: &Blockstore, account_paths: Vec, opts: ProcessOptions, + cache_block_time_sender: Option<&CacheBlockTimeSender>, ) -> BlockstoreProcessorResult { if let Some(num_threads) = opts.override_num_threads { PAR_THREAD_POOL.with(|pool| { @@ -399,8 +400,21 @@ pub fn process_blockstore( let bank0 = Arc::new(bank0); info!("processing ledger for slot 0..."); let recyclers = VerifyRecyclers::default(); - process_bank_0(&bank0, blockstore, &opts, &recyclers); - do_process_blockstore_from_root(blockstore, bank0, &opts, &recyclers, None) + process_bank_0( + &bank0, + blockstore, + &opts, + &recyclers, + cache_block_time_sender, + ); + do_process_blockstore_from_root( + blockstore, + bank0, + &opts, + &recyclers, + None, + cache_block_time_sender, + ) } // Process blockstore from a known root bank @@ -409,7 +423,8 @@ pub(crate) fn process_blockstore_from_root( bank: Bank, opts: &ProcessOptions, recyclers: &VerifyRecyclers, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, + cache_block_time_sender: Option<&CacheBlockTimeSender>, ) -> BlockstoreProcessorResult { do_process_blockstore_from_root( blockstore, @@ -417,6 +432,7 @@ pub(crate) fn process_blockstore_from_root( opts, recyclers, transaction_status_sender, + cache_block_time_sender, ) } @@ -425,7 +441,8 @@ fn do_process_blockstore_from_root( bank: Arc, opts: &ProcessOptions, recyclers: &VerifyRecyclers, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, + cache_block_time_sender: Option<&CacheBlockTimeSender>, ) -> BlockstoreProcessorResult { info!("processing ledger from slot {}...", bank.slot()); let allocated = thread_mem_usage::Allocatedp::default(); @@ -488,6 +505,7 @@ fn do_process_blockstore_from_root( opts, recyclers, transaction_status_sender, + cache_block_time_sender, &mut timing, )?; initial_forks.sort_by_key(|bank| bank.slot()); @@ -588,7 +606,7 @@ fn confirm_full_slot( opts: &ProcessOptions, recyclers: &VerifyRecyclers, progress: &mut ConfirmationProgress, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, replay_vote_sender: Option<&ReplayVoteSender>, timing: &mut ExecuteTimings, ) -> result::Result<(), BlockstoreProcessorError> { @@ -667,7 +685,7 @@ pub fn confirm_slot( timing: &mut ConfirmationTiming, progress: &mut ConfirmationProgress, skip_verification: bool, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, replay_vote_sender: Option<&ReplayVoteSender>, entry_callback: Option<&ProcessCallback>, recyclers: &VerifyRecyclers, @@ -787,6 +805,7 @@ fn process_bank_0( blockstore: &Blockstore, opts: &ProcessOptions, recyclers: &VerifyRecyclers, + cache_block_time_sender: Option<&CacheBlockTimeSender>, ) { assert_eq!(bank0.slot(), 0); let mut progress = ConfirmationProgress::new(bank0.last_blockhash()); @@ -802,6 +821,7 @@ fn process_bank_0( ) .expect("processing for bank 0 must succeed"); bank0.freeze(); + cache_block_time(bank0, cache_block_time_sender); } // Given a bank, add its children to the pending slots queue if those children slots are @@ -863,6 +883,7 @@ fn process_next_slots( // Iterate through blockstore processing slots starting from the root slot pointed to by the // given `meta` and return a vector of frozen bank forks +#[allow(clippy::too_many_arguments)] fn load_frozen_forks( root_bank: &Arc, root_meta: &SlotMeta, @@ -871,7 +892,8 @@ fn load_frozen_forks( root: &mut Slot, opts: &ProcessOptions, recyclers: &VerifyRecyclers, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, + cache_block_time_sender: Option<&CacheBlockTimeSender>, timing: &mut ExecuteTimings, ) -> result::Result>, BlockstoreProcessorError> { let mut initial_forks = HashMap::new(); @@ -928,7 +950,8 @@ fn load_frozen_forks( opts, recyclers, &mut progress, - transaction_status_sender.clone(), + transaction_status_sender, + cache_block_time_sender, None, timing, ) @@ -1087,7 +1110,8 @@ fn process_single_slot( opts: &ProcessOptions, recyclers: &VerifyRecyclers, progress: &mut ConfirmationProgress, - transaction_status_sender: Option, + transaction_status_sender: Option<&TransactionStatusSender>, + cache_block_time_sender: Option<&CacheBlockTimeSender>, replay_vote_sender: Option<&ReplayVoteSender>, timing: &mut ExecuteTimings, ) -> result::Result<(), BlockstoreProcessorError> { @@ -1107,6 +1131,7 @@ fn process_single_slot( })?; bank.freeze(); // all banks handled by this routine are created from complete slots + cache_block_time(bank, cache_block_time_sender); Ok(()) } @@ -1181,6 +1206,16 @@ impl TransactionStatusSender { } } +pub type CacheBlockTimeSender = Sender>; + +pub fn cache_block_time(bank: &Arc, cache_block_time_sender: Option<&CacheBlockTimeSender>) { + if let Some(cache_block_time_sender) = cache_block_time_sender { + cache_block_time_sender + .send(bank.clone()) + .unwrap_or_else(|err| warn!("cache_block_time_sender failed: {:?}", err)); + } +} + // used for tests only pub fn fill_blockstore_slot_with_ticks( blockstore: &Blockstore, @@ -1286,6 +1321,7 @@ pub mod tests { poh_verify: true, ..ProcessOptions::default() }, + None, ) .unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![0]); @@ -1330,6 +1366,7 @@ pub mod tests { poh_verify: true, ..ProcessOptions::default() }, + None, ) .unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![0]); @@ -1346,6 +1383,7 @@ pub mod tests { poh_verify: true, ..ProcessOptions::default() }, + None, ) .unwrap(); @@ -1401,7 +1439,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![0]); } @@ -1466,7 +1504,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![0]); // slot 1 isn't "full", we stop at slot zero @@ -1485,7 +1523,7 @@ pub mod tests { fill_blockstore_slot_with_ticks(&blockstore, ticks_per_slot, 3, 0, blockhash); // Slot 0 should not show up in the ending bank_forks_info let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); // slot 1 isn't "full", we stop at slot zero assert_eq!(frozen_bank_slots(&bank_forks), vec![0, 3]); @@ -1552,7 +1590,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); // One fork, other one is ignored b/c not a descendant of the root assert_eq!(frozen_bank_slots(&bank_forks), vec![4]); @@ -1631,7 +1669,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![1, 2, 3, 4]); assert_eq!(bank_forks.working_bank().slot(), 4); @@ -1691,6 +1729,7 @@ pub mod tests { &blockstore, Vec::new(), ProcessOptions::default(), + None, ) .unwrap(); @@ -1740,6 +1779,7 @@ pub mod tests { &blockstore, Vec::new(), ProcessOptions::default(), + None, ) .unwrap(); @@ -1792,6 +1832,7 @@ pub mod tests { &blockstore, Vec::new(), ProcessOptions::default(), + None, ) .unwrap(); @@ -1842,7 +1883,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); // There is one fork, head is last_slot + 1 assert_eq!(frozen_bank_slots(&bank_forks), vec![last_slot + 1]); @@ -1986,7 +2027,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![0, 1]); assert_eq!(bank_forks.root(), 0); @@ -2015,7 +2056,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![0]); let bank = bank_forks[0].clone(); @@ -2032,7 +2073,7 @@ pub mod tests { override_num_threads: Some(1), ..ProcessOptions::default() }; - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); PAR_THREAD_POOL.with(|pool| { assert_eq!(pool.borrow().current_num_threads(), 1); }); @@ -2049,7 +2090,7 @@ pub mod tests { ..ProcessOptions::default() }; let (_bank_forks, leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(leader_schedule.max_schedules(), std::usize::MAX); } @@ -2109,7 +2150,7 @@ pub mod tests { entry_callback: Some(entry_callback), ..ProcessOptions::default() }; - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(*callback_counter.write().unwrap(), 2); } @@ -2763,7 +2804,7 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); // Should be able to fetch slot 0 because we specified halting at slot 0, even // if there is a greater root at slot 1. @@ -2813,7 +2854,7 @@ pub mod tests { ..ProcessOptions::default() }; let recyclers = VerifyRecyclers::default(); - process_bank_0(&bank0, &blockstore, &opts, &recyclers); + process_bank_0(&bank0, &blockstore, &opts, &recyclers, None); let bank1 = Arc::new(Bank::new_from_parent(&bank0, &Pubkey::default(), 1)); confirm_full_slot( &blockstore, @@ -2830,7 +2871,8 @@ pub mod tests { // Test process_blockstore_from_root() from slot 1 onwards let (bank_forks, _leader_schedule) = - do_process_blockstore_from_root(&blockstore, bank1, &opts, &recyclers, None).unwrap(); + do_process_blockstore_from_root(&blockstore, bank1, &opts, &recyclers, None, None) + .unwrap(); assert_eq!(frozen_bank_slots(&bank_forks), vec![5, 6]); assert_eq!(bank_forks.working_bank().slot(), 6); @@ -3257,7 +3299,8 @@ pub mod tests { ..ProcessOptions::default() }; let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts.clone()).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts.clone(), None) + .unwrap(); // prepare to add votes let last_vote_bank_hash = bank_forks.get(last_main_fork_slot - 1).unwrap().hash(); @@ -3289,7 +3332,8 @@ pub mod tests { ); let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts.clone()).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts.clone(), None) + .unwrap(); assert_eq!(bank_forks.root(), expected_root_slot); assert_eq!( @@ -3344,7 +3388,7 @@ pub mod tests { ); let (bank_forks, _leader_schedule) = - process_blockstore(&genesis_config, &blockstore, Vec::new(), opts).unwrap(); + process_blockstore(&genesis_config, &blockstore, Vec::new(), opts, None).unwrap(); assert_eq!(bank_forks.root(), really_expected_root_slot); }