Skip to content

Commit

Permalink
pr: typo, and use purge_old_bank_snapshots()
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Feb 29, 2024
1 parent 35546ca commit 3e42432
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ledger/src/bank_forks_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,12 @@ fn bank_forks_from_snapshot(
})?;

// If the node crashes before taking the next bank snapshot, the next startup will attempt
// to load from the same bank snapshot again. And if `shrink` has run, the account storage
// to load from the same bank snapshot again. And if `shrink` has run, the account storage
// files that are hard linked in bank snapshot will be *different* than what the bank
// snapshot exists. This would cause the node to crash again. To prevent that, purge all
// snapshot expects. This would cause the node to crash again. To prevent that, purge all
// the bank snapshots here. In the above scenario, this will cause the node to load from a
// snapshot archive next time, which is safe.
snapshot_utils::purge_all_bank_snapshots(&snapshot_config.bank_snapshots_dir);
snapshot_utils::purge_old_bank_snapshots(&snapshot_config.bank_snapshots_dir, 0, None);

bank
};
Expand Down

0 comments on commit 3e42432

Please sign in to comment.