pub fn package_and_archive_full_snapshot(
    bank: &Bank,
    bank_snapshot_info: &BankSnapshotInfo,
    bank_snapshots_dir: impl AsRef<Path>,
    snapshot_archives_dir: impl AsRef<Path>,
    snapshot_storages: SnapshotStorages,
    archive_format: ArchiveFormat,
    snapshot_version: SnapshotVersion,
    maximum_full_snapshot_archives_to_retain: usize,
    maximum_incremental_snapshot_archives_to_retain: usize,
) -> Result<FullSnapshotArchiveInfo> {
    let accounts_package = AccountsPackage::new(
        bank,
        bank_snapshot_info,
        bank_snapshots_dir,
        bank.src.slot_deltas(&bank.src.roots()),
        snapshot_archives_dir,
        snapshot_storages,
        archive_format,
        snapshot_version,
        None,
        Some(SnapshotType::FullSnapshot),
    )?;

    let snapshot_package = SnapshotPackage::from(accounts_package);
    archive_snapshot_package(
        &snapshot_package,
        maximum_full_snapshot_archives_to_retain,
        maximum_incremental_snapshot_archives_to_retain,
    )?;

    Ok(FullSnapshotArchiveInfo::new(
        snapshot_package.snapshot_archive_info,
    ))
}
/// Helper function to hold shared code to package, process, and archive full snapshots
Helper function to hold shared code to package, process, and archive full snapshots
Helper function to hold shared code to package process and archive full snapshots
pub fn package_and_archive_full_snapshot(
    bank: &Bank,
    bank_snapshot_info: &BankSnapshotInfo,
    bank_snapshots_dir: impl AsRef<Path>,
    snapshot_archives_dir: impl AsRef<Path>,
    snapshot_storages: SnapshotStorages,
    archive_format: ArchiveFormat,
    snapshot_version: SnapshotVersion,
    maximum_full_snapshot_archives_to_retain: usize,
    maximum_incremental_snapshot_archives_to_retain: usize,
) -> Result<FullSnapshotArchiveInfo> {
    let accounts_package = AccountsPackage::new(
        bank,
        bank_snapshot_info,
        bank_snapshots_dir,
        bank.src.slot_deltas(&bank.src.roots()),
        snapshot_archives_dir,
        snapshot_storages,
        archive_format,
        snapshot_version,
        None,
        Some(SnapshotType::FullSnapshot),
    )?;
    let snapshot_package = SnapshotPackage::from(accounts_package);
    archive_snapshot_package(
        &snapshot_package,
        maximum_full_snapshot_archives_to_retain,
        maximum_incremental_snapshot_archives_to_retain,
    )?;
    Ok(FullSnapshotArchiveInfo::new(
        snapshot_package.snapshot_archive_info,
    ))
}
pub fn package_and_archive_full_snapshot ( bank : & Bank , bank_snapshot_info : & BankSnapshotInfo , bank_snapshots_dir : impl AsRef < Path > , snapshot_archives_dir : impl AsRef < Path > , snapshot_storages : SnapshotStorages , archive_format : ArchiveFormat , snapshot_version : SnapshotVersion , maximum_full_snapshot_archives_to_retain : usize , maximum_incremental_snapshot_archives_to_retain : usize , ) -> Result < FullSnapshotArchiveInfo > { let accounts_package = AccountsPackage :: new ( bank , bank_snapshot_info , bank_snapshots_dir , bank . src . slot_deltas ( & bank . src . roots ( ) ) , snapshot_archives_dir , snapshot_storages , archive_format , snapshot_version , None , Some ( SnapshotType :: FullSnapshot ) , ) ? ; let snapshot_package = SnapshotPackage :: from ( accounts_package ) ; archive_snapshot_package ( & snapshot_package , maximum_full_snapshot_archives_to_retain , maximum_incremental_snapshot_archives_to_retain , ) ? ; Ok ( FullSnapshotArchiveInfo :: new ( snapshot_package . snapshot_archive_info , ) ) }
Helper function to hold shared code to package, process, and archive full snapshots
Helper function to hold shared code to package process and archive full snapshots
bank
&Bank
bank_snapshot_info
&BankSnapshotInfo
bank_snapshots_dir
impl AsRef<Path>
snapshot_archives_dir
impl AsRef<Path>
snapshot_storages
SnapshotStorages
archive_format
ArchiveFormat
snapshot_version
SnapshotVersion
maximum_full_snapshot_archives_to_retain
usize
maximum_incremental_snapshot_archives_to_retain
usize