Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Refactors snapshot_archive_info in bank_from_snapshot_archives() (#28776
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brooksprumo authored Nov 9, 2022
1 parent 9e1cdc7 commit df81cd1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,16 +1019,16 @@ pub fn bank_from_snapshot_archives(
measure_rebuild.stop();
info!("{}", measure_rebuild);

let snapshot_archive_info = incremental_snapshot_archive_info.map_or_else(
|| full_snapshot_archive_info.snapshot_archive_info(),
|incremental_snapshot_archive_info| {
incremental_snapshot_archive_info.snapshot_archive_info()
},
);
verify_bank_against_expected_slot_hash(
&bank,
incremental_snapshot_archive_info.as_ref().map_or(
full_snapshot_archive_info.slot(),
|incremental_snapshot_archive_info| incremental_snapshot_archive_info.slot(),
),
incremental_snapshot_archive_info.as_ref().map_or(
*full_snapshot_archive_info.hash(),
|incremental_snapshot_archive_info| *incremental_snapshot_archive_info.hash(),
),
snapshot_archive_info.slot,
snapshot_archive_info.hash,
)?;

let mut measure_verify = Measure::start("verify");
Expand Down

0 comments on commit df81cd1

Please sign in to comment.