Add default() to SnapshotConfig (#19776)
This commit is contained in:
@ -338,12 +338,7 @@ mod tests {
|
||||
let snapshot_config = SnapshotConfig {
|
||||
full_snapshot_archive_interval_slots,
|
||||
incremental_snapshot_archive_interval_slots: Slot::MAX,
|
||||
snapshot_archives_dir: PathBuf::default(),
|
||||
bank_snapshots_dir: PathBuf::default(),
|
||||
archive_format: ArchiveFormat::Tar,
|
||||
snapshot_version: SnapshotVersion::default(),
|
||||
maximum_full_snapshot_archives_to_retain: usize::MAX,
|
||||
maximum_incremental_snapshot_archives_to_retain: usize::MAX,
|
||||
..SnapshotConfig::default()
|
||||
};
|
||||
for i in 0..MAX_SNAPSHOT_HASHES + 1 {
|
||||
let accounts_package = AccountsPackage {
|
||||
|
@ -14,12 +14,7 @@ use {
|
||||
solana_rpc::rpc::JsonRpcConfig,
|
||||
solana_runtime::{
|
||||
genesis_utils::create_genesis_config_with_leader_ex,
|
||||
hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE,
|
||||
snapshot_config::SnapshotConfig,
|
||||
snapshot_utils::{
|
||||
ArchiveFormat, SnapshotVersion, DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
},
|
||||
hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE, snapshot_config::SnapshotConfig,
|
||||
},
|
||||
solana_sdk::{
|
||||
account::{Account, AccountSharedData},
|
||||
@ -526,12 +521,7 @@ impl TestValidator {
|
||||
incremental_snapshot_archive_interval_slots: Slot::MAX,
|
||||
bank_snapshots_dir: ledger_path.join("snapshot"),
|
||||
snapshot_archives_dir: ledger_path.to_path_buf(),
|
||||
archive_format: ArchiveFormat::Tar,
|
||||
snapshot_version: SnapshotVersion::default(),
|
||||
maximum_full_snapshot_archives_to_retain:
|
||||
DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
maximum_incremental_snapshot_archives_to_retain:
|
||||
DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
..SnapshotConfig::default()
|
||||
}),
|
||||
enforce_ulimit_nofile: false,
|
||||
warp_slot: config.warp_slot,
|
||||
|
Reference in New Issue
Block a user