Spy just for RPC to avoid premature supermajority (#7856)

* Spy just for RPC to avoid premature supermajority

* Make gossip_content_info private

Co-Authored-By: Michael Vines <mvines@gmail.com>

* Fix misindent...

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
Ryo Onodera
2020-01-20 10:50:31 +09:00
committed by GitHub
parent 43c32ea280
commit a8d33c9950
2 changed files with 33 additions and 32 deletions

View File

@ -198,7 +198,10 @@ fn get_rpc_addr(
identity_keypair: &Arc<Keypair>,
entrypoint_gossip: &SocketAddr,
) -> (RpcClient, SocketAddr) {
let mut cluster_info = ClusterInfo::new(node.info.clone(), identity_keypair.clone());
let mut cluster_info = ClusterInfo::new(
ClusterInfo::spy_contact_info(&identity_keypair.pubkey()),
identity_keypair.clone(),
);
cluster_info.set_entrypoint(ContactInfo::new_gossip_entry_point(entrypoint_gossip));
let cluster_info = Arc::new(RwLock::new(cluster_info));