Adds docs to scan_all_accounts() (#32888)

This commit is contained in:
Brooks 2023-08-18 12:04:07 -04:00 committed by GitHub
parent 1e8f7b5d1e
commit 004577d94a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -3332,8 +3332,7 @@ fn main() {
}
};
let mut measure = Measure::start("scanning accounts");
bank.scan_all_accounts_with_modified_slots(scan_func)
.unwrap();
bank.scan_all_accounts(scan_func).unwrap();
measure.stop();
info!("{}", measure);
if let Some(json_serializer) = json_serializer {

View File

@ -6854,7 +6854,8 @@ impl Bank {
self.rc.accounts.load_all(&self.ancestors, self.bank_id)
}
pub fn scan_all_accounts_with_modified_slots<F>(&self, scan_func: F) -> ScanResult<()>
// Scans all the accounts this bank can load, applying `scan_func`
pub fn scan_all_accounts<F>(&self, scan_func: F) -> ScanResult<()>
where
F: FnMut(Option<(&Pubkey, AccountSharedData, Slot)>),
{