Removes unnecessary AccountsHashVerifier from snapshot tests (#30738)
This commit is contained in:
parent
aaaee556d8
commit
6bdbd2dfec
|
@ -213,26 +213,7 @@ fn run_bank_forks_snapshot_n<F>(
|
|||
let bank_forks = &mut snapshot_test_config.bank_forks;
|
||||
let mint_keypair = &snapshot_test_config.genesis_config_info.mint_keypair;
|
||||
|
||||
let (accounts_package_sender, accounts_package_receiver) = crossbeam_channel::unbounded();
|
||||
let exit = Arc::new(AtomicBool::new(false));
|
||||
let node_id = Arc::new(Keypair::new());
|
||||
let cluster_info = Arc::new(ClusterInfo::new(
|
||||
ContactInfo::new_localhost(&node_id.pubkey(), timestamp()),
|
||||
Arc::clone(&node_id),
|
||||
SocketAddrSpace::Unspecified,
|
||||
));
|
||||
let accounts_hash_verifier = AccountsHashVerifier::new(
|
||||
accounts_package_sender.clone(),
|
||||
accounts_package_receiver,
|
||||
None,
|
||||
&exit,
|
||||
&cluster_info,
|
||||
None,
|
||||
false,
|
||||
0,
|
||||
snapshot_test_config.snapshot_config.clone(),
|
||||
);
|
||||
|
||||
let (accounts_package_sender, _accounts_package_receiver) = crossbeam_channel::unbounded();
|
||||
let (snapshot_request_sender, snapshot_request_receiver) = unbounded();
|
||||
let request_sender = AbsRequestSender::new(snapshot_request_sender.clone());
|
||||
let snapshot_request_handler = SnapshotRequestHandler {
|
||||
|
@ -296,9 +277,6 @@ fn run_bank_forks_snapshot_n<F>(
|
|||
let account_paths = &[temporary_accounts_dir];
|
||||
let genesis_config = &snapshot_test_config.genesis_config_info.genesis_config;
|
||||
restore_from_snapshot(bank_forks, last_slot, genesis_config, account_paths);
|
||||
|
||||
exit.store(true, Ordering::Relaxed);
|
||||
accounts_hash_verifier.join().unwrap();
|
||||
}
|
||||
|
||||
#[test_case(V1_2_0, Development)]
|
||||
|
@ -728,26 +706,7 @@ fn test_bank_forks_incremental_snapshot(
|
|||
let bank_forks = &mut snapshot_test_config.bank_forks;
|
||||
let mint_keypair = &snapshot_test_config.genesis_config_info.mint_keypair;
|
||||
|
||||
let (accounts_package_sender, accounts_package_receiver) = crossbeam_channel::unbounded();
|
||||
let exit = Arc::new(AtomicBool::new(false));
|
||||
let node_id = Arc::new(Keypair::new());
|
||||
let cluster_info = Arc::new(ClusterInfo::new(
|
||||
ContactInfo::new_localhost(&node_id.pubkey(), timestamp()),
|
||||
Arc::clone(&node_id),
|
||||
SocketAddrSpace::Unspecified,
|
||||
));
|
||||
let accounts_hash_verifier = AccountsHashVerifier::new(
|
||||
accounts_package_sender.clone(),
|
||||
accounts_package_receiver,
|
||||
None,
|
||||
&exit,
|
||||
&cluster_info,
|
||||
None,
|
||||
false,
|
||||
0,
|
||||
snapshot_test_config.snapshot_config.clone(),
|
||||
);
|
||||
|
||||
let (accounts_package_sender, _accounts_package_receiver) = crossbeam_channel::unbounded();
|
||||
let (snapshot_request_sender, snapshot_request_receiver) = unbounded();
|
||||
let request_sender = AbsRequestSender::new(snapshot_request_sender.clone());
|
||||
let snapshot_request_handler = SnapshotRequestHandler {
|
||||
|
@ -829,8 +788,6 @@ fn test_bank_forks_incremental_snapshot(
|
|||
.unwrap();
|
||||
}
|
||||
}
|
||||
exit.store(true, Ordering::Relaxed);
|
||||
accounts_hash_verifier.join().unwrap();
|
||||
}
|
||||
|
||||
fn make_full_snapshot_archive(
|
||||
|
|
Loading…
Reference in New Issue