Snapshot hash gossip changes (#8358)
This commit is contained in:
@ -5,6 +5,8 @@ mod tests {
|
||||
use bincode::serialize_into;
|
||||
use fs_extra::dir::CopyOptions;
|
||||
use itertools::Itertools;
|
||||
use solana_core::cluster_info::ClusterInfo;
|
||||
use solana_core::contact_info::ContactInfo;
|
||||
use solana_core::{
|
||||
genesis_utils::{create_genesis_config, GenesisConfigInfo},
|
||||
snapshot_packager_service::SnapshotPackagerService,
|
||||
@ -24,6 +26,7 @@ mod tests {
|
||||
signature::{Keypair, KeypairUtil},
|
||||
system_transaction,
|
||||
};
|
||||
use std::sync::RwLock;
|
||||
use std::{fs, path::PathBuf, sync::atomic::AtomicBool, sync::mpsc::channel, sync::Arc};
|
||||
use tempfile::TempDir;
|
||||
|
||||
@ -296,7 +299,13 @@ mod tests {
|
||||
// correctly construct the earlier snapshots because the SnapshotPackage's on the
|
||||
// channel hold hard links to these deleted snapshots. We verify this is the case below.
|
||||
let exit = Arc::new(AtomicBool::new(false));
|
||||
let snapshot_packager_service = SnapshotPackagerService::new(receiver, &exit);
|
||||
|
||||
let cluster_info = Arc::new(RwLock::new(ClusterInfo::new_with_invalid_keypair(
|
||||
ContactInfo::default(),
|
||||
)));
|
||||
|
||||
let snapshot_packager_service =
|
||||
SnapshotPackagerService::new(receiver, &exit, &cluster_info);
|
||||
|
||||
// Close the channel so that the package service will exit after reading all the
|
||||
// packages off the channel
|
||||
|
Reference in New Issue
Block a user