Skip to content

Commit

Permalink
Unzips Option when deserializing snapshot data files (solana-labs#32652)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Jul 28, 2023
1 parent 965ed1a commit 16ec9a6
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,18 +1036,14 @@ fn deserialize_snapshot_data_files_capped<T: Sized>(
if let Some(ref incremental_snapshot_root_file_path) =
snapshot_root_paths.incremental_snapshot_root_file_path
{
let (incremental_snapshot_file_size, incremental_snapshot_data_file_stream) =
create_snapshot_data_file_stream(
incremental_snapshot_root_file_path,
maximum_file_size,
)?;
(
Some(incremental_snapshot_file_size),
Some(incremental_snapshot_data_file_stream),
)
Some(create_snapshot_data_file_stream(
incremental_snapshot_root_file_path,
maximum_file_size,
)?)
} else {
(None, None)
};
None
}
.unzip();

let mut snapshot_streams = SnapshotStreams {
full_snapshot_stream: &mut full_snapshot_data_file_stream,
Expand Down

0 comments on commit 16ec9a6

Please sign in to comment.