exit early deep in bank freeze, avoiding some unnecessary work (#28238)

exit early on bank freeze
This commit is contained in:
Jeff Washington (jwash) 2022-10-05 14:49:33 -07:00 committed by GitHub
parent a8c6a9e5fc
commit ad0742c7cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -7662,6 +7662,10 @@ impl AccountsDb {
skipped_rewrites: &Rewrites,
) {
let mut skipped_rewrites = skipped_rewrites.read().unwrap().clone();
if skipped_rewrites.is_empty() {
// if there are no skipped rewrites, then there is nothing futher to do
return;
}
hashes.iter().for_each(|(key, _)| {
skipped_rewrites.remove(key);
});