Adds docs to scan_all_accounts() (#32888)
This commit is contained in:
parent
1e8f7b5d1e
commit
004577d94a
|
@ -3332,8 +3332,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let mut measure = Measure::start("scanning accounts");
|
let mut measure = Measure::start("scanning accounts");
|
||||||
bank.scan_all_accounts_with_modified_slots(scan_func)
|
bank.scan_all_accounts(scan_func).unwrap();
|
||||||
.unwrap();
|
|
||||||
measure.stop();
|
measure.stop();
|
||||||
info!("{}", measure);
|
info!("{}", measure);
|
||||||
if let Some(json_serializer) = json_serializer {
|
if let Some(json_serializer) = json_serializer {
|
||||||
|
|
|
@ -6854,7 +6854,8 @@ impl Bank {
|
||||||
self.rc.accounts.load_all(&self.ancestors, self.bank_id)
|
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
|
where
|
||||||
F: FnMut(Option<(&Pubkey, AccountSharedData, Slot)>),
|
F: FnMut(Option<(&Pubkey, AccountSharedData, Slot)>),
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue