File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -1548,6 +1548,7 @@ pub struct AccountsDb {
1548
1548
pub epoch_accounts_hash_manager: EpochAccountsHashManager,
1549
1549
1550
1550
/// The latest full snapshot slot dictates how to handle zero lamport accounts
1551
+ /// Note, this is None if we're told to *not* take snapshots
1551
1552
latest_full_snapshot_slot: SeqLock<Option<Slot>>,
1552
1553
1553
1554
/// Flag to indicate if the experimental accounts lattice hash is enabled.
Original file line number Diff line number Diff line change @@ -335,10 +335,20 @@ fn bank_forks_from_snapshot(
335
335
// We must inform accounts-db of the latest full snapshot slot, which is used by the background
336
336
// processes to handle zero lamport accounts. Since we've now successfully loaded the bank
337
337
// from snapshots, this is a good time to do that update.
338
- bank. rc
339
- . accounts
340
- . accounts_db
341
- . set_latest_full_snapshot_slot ( full_snapshot_archive_info. slot ( ) ) ;
338
+ // Note, this must only be set if we should generate snapshots.
339
+ if snapshot_config. should_generate_snapshots ( ) {
340
+ bank. rc
341
+ . accounts
342
+ . accounts_db
343
+ . set_latest_full_snapshot_slot ( full_snapshot_archive_info. slot ( ) ) ;
344
+ } else {
345
+ assert ! ( bank
346
+ . rc
347
+ . accounts
348
+ . accounts_db
349
+ . latest_full_snapshot_slot( )
350
+ . is_none( ) ) ;
351
+ }
342
352
343
353
let full_snapshot_hash = FullSnapshotHash ( (
344
354
full_snapshot_archive_info. slot ( ) ,
You can’t perform that action at this time.
0 commit comments