Skip to content

Commit 2a3b174

Browse files
committed
fix: post review comments
1 parent 71a3567 commit 2a3b174

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

magicblock-accounts-db/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl AccountsDb {
279279

280280
/// Updates the current slot.
281281
#[inline(always)]
282-
pub fn set_slot(self: &Arc<Self>, slot: u64) {
282+
pub fn set_slot(&self, slot: u64) {
283283
self.storage.update_slot(slot);
284284
}
285285

magicblock-accounts-db/src/snapshot.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ impl SnapshotManager {
105105
slot: u64,
106106
active_mem: &[u8],
107107
) -> AccountsDbResult<PathBuf> {
108-
self.prune_registry();
109-
110108
let snap_path = self.slot_to_dir_path(slot);
111109
let memory_capture =
112110
matches!(self.strategy, SnapshotStrategy::LegacyCopy)
@@ -116,6 +114,7 @@ impl SnapshotManager {
116114
self.strategy
117115
.execute(&self.db_path, &snap_path, memory_capture)
118116
.log_err(|| "Snapshot failed")?;
117+
self.prune_registry();
119118

120119
Ok(snap_path)
121120
}

0 commit comments

Comments
 (0)