Skip to content

Commit

Permalink
refactor RecycleStores::add_entries (solana-labs#29475)
Browse files Browse the repository at this point in the history
* refactor RecycleStores::add_entries

* pr feedback
  • Loading branch information
jeffwashington authored and nickfrosty committed Jan 4, 2023
1 parent 0648f49 commit 7440704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1196,9 +1196,9 @@ impl RecycleStores {
}

fn add_entries(&mut self, new_entries: SnapshotStorage) {
self.total_bytes += new_entries.iter().map(|e| e.total_bytes()).sum::<u64>();
let now = Instant::now();
for new_entry in new_entries {
self.total_bytes += new_entry.total_bytes();
self.entries.push((now, new_entry));
}
}
Expand Down

0 comments on commit 7440704

Please sign in to comment.