Snapshot hash gossip changes (#8358)

This commit is contained in:
sakridge
2020-02-20 11:46:13 -08:00
committed by GitHub
parent e50bc0d34b
commit 1720fe6a46
7 changed files with 105 additions and 7 deletions

View File

@ -1,5 +1,6 @@
use solana_runtime::{accounts_db::AccountStorageEntry, bank::BankSlotDelta};
use solana_sdk::clock::Slot;
use solana_sdk::hash::Hash;
use std::{
path::PathBuf,
sync::{
@ -20,6 +21,7 @@ pub struct SnapshotPackage {
pub snapshot_links: TempDir,
pub storage_entries: Vec<Arc<AccountStorageEntry>>,
pub tar_output_file: PathBuf,
pub hash: Hash,
}
impl SnapshotPackage {
@ -29,6 +31,7 @@ impl SnapshotPackage {
snapshot_links: TempDir,
storage_entries: Vec<Arc<AccountStorageEntry>>,
tar_output_file: PathBuf,
hash: Hash,
) -> Self {
Self {
root,
@ -36,6 +39,7 @@ impl SnapshotPackage {
snapshot_links,
storage_entries,
tar_output_file,
hash,
}
}
}

View File

@ -106,6 +106,7 @@ pub fn package_snapshot<P: AsRef<Path>, Q: AsRef<Path>>(
snapshot_hard_links_dir,
account_storage_entries,
snapshot_package_output_file.as_ref().to_path_buf(),
bank.hash(),
);
Ok(package)