Skip to content

Commit

Permalink
v2.0: Startup only sets latest_full_snapshot_slot if generating snaps…
Browse files Browse the repository at this point in the history
…hots (backport of anza-xyz#3633) (anza-xyz#3667)

* Startup only sets latest_full_snapshot_slot if generating snapshots (anza-xyz#3633)

(cherry picked from commit 4ea10c2)

# Conflicts:
#	accounts-db/src/accounts_db.rs
#	ledger/src/bank_forks_utils.rs

* fix backport merge conflict

---------

Co-authored-by: Brooks <[email protected]>
  • Loading branch information
mergify[bot] and brooksprumo authored Nov 19, 2024
1 parent 78ea8ff commit aab790b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,13 @@ impl Validator {
let pruned_banks_request_handler = PrunedBanksRequestHandler {
pruned_banks_receiver,
};
let last_full_snapshot_slot = starting_snapshot_hashes.map(|x| x.full.0 .0);
// If we're not generating snapshots, ensure ABS's last full snapshot slot is None to
// ensure we handle zero lamport accounts correctly.
let last_full_snapshot_slot = if config.snapshot_config.should_generate_snapshots() {
starting_snapshot_hashes.map(|x| x.full.0 .0)
} else {
None
};
let accounts_background_service = AccountsBackgroundService::new(
bank_forks.clone(),
exit.clone(),
Expand Down

0 comments on commit aab790b

Please sign in to comment.