diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 91bb4f5f43b0d9..619ed45b00f541 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -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::(); let now = Instant::now(); for new_entry in new_entries { + self.total_bytes += new_entry.total_bytes(); self.entries.push((now, new_entry)); } }