validator: add contact-info query to admin port
This commit is contained in:
committed by
mergify[bot]
parent
17d698d20a
commit
685e40cbf2
@@ -1,7 +1,11 @@
|
||||
use {
|
||||
crate::validator::{Validator, ValidatorConfig, ValidatorStartProgress},
|
||||
solana_client::rpc_client::RpcClient,
|
||||
solana_gossip::{cluster_info::Node, gossip_service::discover_cluster, socketaddr},
|
||||
solana_gossip::{
|
||||
cluster_info::{ClusterInfo, Node},
|
||||
gossip_service::discover_cluster,
|
||||
socketaddr,
|
||||
},
|
||||
solana_ledger::{blockstore::create_new_ledger, create_new_tmp_ledger},
|
||||
solana_net_utils::PortRange,
|
||||
solana_rpc::rpc::JsonRpcConfig,
|
||||
@@ -628,6 +632,10 @@ impl TestValidator {
|
||||
validator.join();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn cluster_info(&self) -> Arc<ClusterInfo> {
|
||||
self.validator.as_ref().unwrap().cluster_info.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for TestValidator {
|
||||
|
@@ -274,6 +274,7 @@ pub struct Validator {
|
||||
tvu: Tvu,
|
||||
ip_echo_server: Option<solana_net_utils::IpEchoServer>,
|
||||
accountsdb_plugin_service: Option<AccountsDbPluginService>,
|
||||
pub cluster_info: Arc<ClusterInfo>,
|
||||
}
|
||||
|
||||
// in the distant future, get rid of ::new()/exit() and use Result properly...
|
||||
@@ -863,6 +864,7 @@ impl Validator {
|
||||
ip_echo_server,
|
||||
validator_exit: config.validator_exit.clone(),
|
||||
accountsdb_plugin_service,
|
||||
cluster_info,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -902,6 +904,8 @@ impl Validator {
|
||||
}
|
||||
|
||||
pub fn join(self) {
|
||||
drop(self.cluster_info);
|
||||
|
||||
self.poh_service.join().expect("poh_service");
|
||||
drop(self.poh_recorder);
|
||||
|
||||
|
Reference in New Issue
Block a user