Move SnapshotConfig into its own module (#18331)

Also move ArchiveFormat to snapshot_utils, and do not
reexport SnapshotVersion.
This commit is contained in:
Brooks Prumo
2021-07-01 08:55:26 -05:00
committed by GitHub
parent cf25729eaa
commit 89a3e4f91e
19 changed files with 70 additions and 61 deletions

View File

@@ -3,7 +3,6 @@ use {
accounts_db::{AccountShrinkThreshold, AccountsDb},
accounts_index::AccountSecondaryIndexes,
bank::{Bank, BankSlotDelta, Builtins},
bank_forks::ArchiveFormat,
hardened_unpack::{unpack_snapshot, ParallelSelector, UnpackError, UnpackedAppendVecMap},
serde_snapshot::{
bank_from_stream, bank_to_stream, SerdeStyle, SnapshotStorage, SnapshotStorages,
@@ -103,6 +102,15 @@ impl SnapshotVersion {
}
}
/// The different archive formats used for snapshots
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum ArchiveFormat {
TarBzip2,
TarGzip,
TarZstd,
Tar,
}
#[derive(PartialEq, Eq, Debug)]
pub struct SlotSnapshotPaths {
pub slot: Slot,