solana_runtime/
snapshot_config.rs1use {
2 crate::snapshot_utils::{self, ArchiveFormat, SnapshotVersion},
3 solana_sdk::clock::Slot,
4 std::path::PathBuf,
5};
6
7#[derive(Clone, Debug)]
9pub struct SnapshotConfig {
10 pub full_snapshot_archive_interval_slots: Slot,
12
13 pub incremental_snapshot_archive_interval_slots: Slot,
15
16 pub full_snapshot_archives_dir: PathBuf,
18
19 pub incremental_snapshot_archives_dir: PathBuf,
21
22 pub bank_snapshots_dir: PathBuf,
24
25 pub archive_format: ArchiveFormat,
27
28 pub snapshot_version: SnapshotVersion,
30
31 pub maximum_full_snapshot_archives_to_retain: usize,
33
34 pub maximum_incremental_snapshot_archives_to_retain: usize,
37
38 pub accounts_hash_debug_verify: bool,
40
41 pub packager_thread_niceness_adj: i8,
43}
44
45impl Default for SnapshotConfig {
46 fn default() -> Self {
47 Self {
48 full_snapshot_archive_interval_slots:
49 snapshot_utils::DEFAULT_FULL_SNAPSHOT_ARCHIVE_INTERVAL_SLOTS,
50 incremental_snapshot_archive_interval_slots:
51 snapshot_utils::DEFAULT_INCREMENTAL_SNAPSHOT_ARCHIVE_INTERVAL_SLOTS,
52 full_snapshot_archives_dir: PathBuf::default(),
53 incremental_snapshot_archives_dir: PathBuf::default(),
54 bank_snapshots_dir: PathBuf::default(),
55 archive_format: ArchiveFormat::TarBzip2,
56 snapshot_version: SnapshotVersion::default(),
57 maximum_full_snapshot_archives_to_retain:
58 snapshot_utils::DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
59 maximum_incremental_snapshot_archives_to_retain:
60 snapshot_utils::DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN,
61 accounts_hash_debug_verify: false,
62 packager_thread_niceness_adj: 0,
63 }
64 }
65}