From b6a6d6986d049fb36b4470587372f5c866b0b181 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Mon, 4 Oct 2021 17:07:01 -0400 Subject: [PATCH] lift store.slot() from loop (#20409) --- runtime/src/accounts_db.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 37efea90a5..b7fbdd1db1 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -5857,9 +5857,10 @@ impl AccountsDb { .into_par_iter() .map(|store| { let accounts = store.all_accounts(); + let slot = store.slot(); accounts .into_iter() - .map(|account| (store.slot(), account.meta.pubkey)) + .map(|account| (slot, account.meta.pubkey)) .collect::>() }) .reduce(HashSet::new, |mut reduced, store_pubkeys| {