diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index c77e8234b16448..a80b4ae0e6c2cb 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -8128,12 +8128,13 @@ impl AccountsDb { let old = pubkey_hash .iter() .map(|(k, _)| { - if let Some((account, hash)) = old_written_accounts.get(k) { - Some(hash.unwrap()) // todo on demand calculate, calculate in bg - } else { - self.load_with_fixed_root(&ancestors, k) - .map(|(account, _)| Self::lt_hash_account(&account, k)) - } + /// TODO: add optimization to cache lt_hash from last slot + //if let Some((account, hash)) = old_written_accounts.get(k) { + // Some(hash.unwrap()) // todo on demand calculate, calculate in bg + //} else { + self.load_with_fixed_root(&ancestors, k) + .map(|(account, _)| Self::lt_hash_account(&account, k)) + //} }) .collect::>();