Sort forks in "ledger processed..." log message

This commit is contained in:
Michael Vines 2021-02-28 13:52:09 -08:00
parent 334b581df2
commit 33eaa2b238
1 changed files with 3 additions and 1 deletions

View File

@ -477,7 +477,7 @@ fn do_process_blockstore_from_root(
if opts.full_leader_cache { if opts.full_leader_cache {
leader_schedule_cache.set_max_schedules(std::usize::MAX); leader_schedule_cache.set_max_schedules(std::usize::MAX);
} }
let initial_forks = load_frozen_forks( let mut initial_forks = load_frozen_forks(
&bank, &bank,
&meta, &meta,
blockstore, blockstore,
@ -487,6 +487,8 @@ fn do_process_blockstore_from_root(
recyclers, recyclers,
transaction_status_sender, transaction_status_sender,
)?; )?;
initial_forks.sort_by_key(|bank| bank.slot());
(initial_forks, leader_schedule_cache) (initial_forks, leader_schedule_cache)
} else { } else {
// If there's no meta for the input `start_slot`, then we started from a snapshot // If there's no meta for the input `start_slot`, then we started from a snapshot