Multiple entrypoint support
This commit is contained in:
@@ -222,7 +222,7 @@ impl Validator {
|
||||
ledger_path: &Path,
|
||||
vote_account: &Pubkey,
|
||||
mut authorized_voter_keypairs: Vec<Arc<Keypair>>,
|
||||
cluster_entrypoint: Option<&ContactInfo>,
|
||||
cluster_entrypoints: Vec<ContactInfo>,
|
||||
config: &ValidatorConfig,
|
||||
) -> Self {
|
||||
let id = identity_keypair.pubkey();
|
||||
@@ -241,7 +241,9 @@ impl Validator {
|
||||
}
|
||||
report_target_features();
|
||||
|
||||
info!("entrypoint: {:?}", cluster_entrypoint);
|
||||
for cluster_entrypoint in &cluster_entrypoints {
|
||||
info!("entrypoint: {:?}", cluster_entrypoint);
|
||||
}
|
||||
|
||||
if solana_perf::perf_libs::api().is_some() {
|
||||
info!("Initializing sigverify, this could take a while...");
|
||||
@@ -492,6 +494,7 @@ impl Validator {
|
||||
config.gossip_validators.clone(),
|
||||
&exit,
|
||||
);
|
||||
cluster_info.set_entrypoints(cluster_entrypoints);
|
||||
|
||||
let serve_repair = Arc::new(RwLock::new(ServeRepair::new(cluster_info.clone())));
|
||||
let serve_repair_service = ServeRepairService::new(
|
||||
@@ -501,12 +504,6 @@ impl Validator {
|
||||
&exit,
|
||||
);
|
||||
|
||||
// Insert the entrypoint info, should only be None if this node
|
||||
// is the bootstrap validator
|
||||
if let Some(cluster_entrypoint) = cluster_entrypoint {
|
||||
cluster_info.set_entrypoint(cluster_entrypoint.clone());
|
||||
}
|
||||
|
||||
let (snapshot_packager_service, snapshot_config_and_package_sender) =
|
||||
if let Some(snapshot_config) = config.snapshot_config.clone() {
|
||||
if is_snapshot_config_invalid(
|
||||
@@ -1287,7 +1284,7 @@ mod tests {
|
||||
&validator_ledger_path,
|
||||
&voting_keypair.pubkey(),
|
||||
vec![voting_keypair.clone()],
|
||||
Some(&leader_node.info),
|
||||
vec![leader_node.info],
|
||||
&config,
|
||||
);
|
||||
validator.close();
|
||||
@@ -1357,7 +1354,7 @@ mod tests {
|
||||
&validator_ledger_path,
|
||||
&vote_account_keypair.pubkey(),
|
||||
vec![Arc::new(vote_account_keypair)],
|
||||
Some(&leader_node.info),
|
||||
vec![leader_node.info.clone()],
|
||||
&config,
|
||||
)
|
||||
})
|
||||
|
Reference in New Issue
Block a user