adds flag to disable duplicate instance check (#15006)

This commit is contained in:
behzad nouri
2021-02-03 16:26:17 +00:00
committed by GitHub
parent 971c222cf7
commit 0ad063f4e9
7 changed files with 68 additions and 10 deletions

View File

@@ -25,8 +25,14 @@ fn test_node(exit: &Arc<AtomicBool>) -> (Arc<ClusterInfo>, GossipService, UdpSoc
let keypair = Arc::new(Keypair::new());
let mut test_node = Node::new_localhost_with_pubkey(&keypair.pubkey());
let cluster_info = Arc::new(ClusterInfo::new(test_node.info.clone(), keypair));
let gossip_service =
GossipService::new(&cluster_info, None, test_node.sockets.gossip, None, exit);
let gossip_service = GossipService::new(
&cluster_info,
None,
test_node.sockets.gossip,
None,
true, // should_check_duplicate_instance
exit,
);
let _ = cluster_info.my_contact_info();
(
cluster_info,
@@ -47,6 +53,7 @@ fn test_node_with_bank(
Some(bank_forks),
test_node.sockets.gossip,
None,
true, // should_check_duplicate_instance
exit,
);
let _ = cluster_info.my_contact_info();