Snapshot hash gossip changes (#8358) (#8359)

automerge
This commit is contained in:
mergify[bot]
2020-02-20 12:52:04 -08:00
committed by GitHub
parent 489fd3058f
commit b4eb81546e
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

@@ -108,6 +108,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)