diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 17ef71399..81fc96a7e 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -58,8 +58,7 @@ use { snapshot_package::PendingAccountsPackage, snapshot_utils::{ self, ArchiveFormat, SnapshotVersion, DEFAULT_ARCHIVE_COMPRESSION, - DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN, - DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN, SUPPORTED_ARCHIVE_COMPRESSION, + SUPPORTED_ARCHIVE_COMPRESSION, }, }, solana_sdk::{ @@ -1441,8 +1440,9 @@ fn main() { .takes_value(true) .help("Log when transactions are processed that reference the given key(s)."); - let default_max_full_snapshot_archives_to_retain = - &DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN.to_string(); + // Use std::usize::MAX for maximum_*_snapshots_to_retain such that + // ledger-tool commands will not remove any snapshots by default + let default_max_full_snapshot_archives_to_retain = &std::usize::MAX.to_string(); let maximum_full_snapshot_archives_to_retain = Arg::with_name( "maximum_full_snapshots_to_retain", ) @@ -1455,8 +1455,7 @@ fn main() { "The maximum number of full snapshot archives to hold on to when purging older snapshots.", ); - let default_max_incremental_snapshot_archives_to_retain = - &DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN.to_string(); + let default_max_incremental_snapshot_archives_to_retain = &std::usize::MAX.to_string(); let maximum_incremental_snapshot_archives_to_retain = Arg::with_name( "maximum_incremental_snapshots_to_retain", )