solana_runtime/
snapshot_config.rsuse {
crate::snapshot_utils::{self, ArchiveFormat, SnapshotVersion},
solana_sdk::clock::Slot,
std::path::PathBuf,
};
#[derive(Clone, Debug)]
pub struct SnapshotConfig {
pub full_snapshot_archive_interval_slots: Slot,
pub incremental_snapshot_archive_interval_slots: Slot,
pub full_snapshot_archives_dir: PathBuf,
pub incremental_snapshot_archives_dir: PathBuf,
pub bank_snapshots_dir: PathBuf,
pub archive_format: ArchiveFormat,
pub snapshot_version: SnapshotVersion,
pub maximum_full_snapshot_archives_to_retain: usize,
pub maximum_incremental_snapshot_archives_to_retain: usize,
pub accounts_hash_debug_verify: bool,
pub packager_thread_niceness_adj: i8,
}
impl Default for SnapshotConfig {
fn default() -> Self {
Self {
full_snapshot_archive_interval_slots:
snapshot_utils::DEFAULT_FULL_SNAPSHOT_ARCHIVE_INTERVAL_SLOTS,
incremental_snapshot_archive_interval_slots:
snapshot_utils::DEFAULT_INCREMENTAL_SNAPSHOT_ARCHIVE_INTERVAL_SLOTS,
full_snapshot_archives_dir: PathBuf::default(),
incremental_snapshot_archives_dir: PathBuf::default(),
bank_snapshots_dir: PathBuf::default(),
archive_format: ArchiveFormat::TarBzip2,
snapshot_version: SnapshotVersion::default(),
maximum_full_snapshot_archives_to_retain:
snapshot_utils::DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
maximum_incremental_snapshot_archives_to_retain:
snapshot_utils::DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN,
accounts_hash_debug_verify: false,
packager_thread_niceness_adj: 0,
}
}
}