Make solana-ledger-tool retain all snapshots by default (#27788)
This commit is contained in:
parent
1a4b8b5b79
commit
1d5314b5e6
|
@ -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",
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue