Skip to content

Commit

Permalink
Remove assert
Browse files Browse the repository at this point in the history
  • Loading branch information
carllin committed Apr 4, 2024
1 parent 7547ff7 commit 611c942
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions local-cluster/src/local_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,11 +917,12 @@ impl Cluster for LocalCluster {
let entry_point_infos: Vec<ContactInfo> = self
.validators
.values()
.map(|validator| validator.info.contact_info.clone())
.map(|validator| {
// Should not be restarting a validator that is still alive
assert!(validator.info.contact_info.pubkey() != pubkey);
validator.info.contact_info.clone()
})
.collect();
if entry_point_infos.is_empty() {
panic!("Validator has no alive entrypoints to rejoin cluster with");
}

(node, entry_point_infos)
}
Expand Down Expand Up @@ -954,9 +955,6 @@ impl Cluster for LocalCluster {
(node, entry_point_infos): (Node, Vec<ContactInfo>),
socket_addr_space: SocketAddrSpace,
) -> ClusterValidatorInfo {
if entry_point_infos.is_empty() {
panic!("Passed empty entrypoints list");
}
// Restart the node
let validator_info = &cluster_validator_info.info;
LocalCluster::sync_ledger_path_across_nested_config_fields(
Expand Down

0 comments on commit 611c942

Please sign in to comment.