Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Aug 26, 2024
1 parent 70a49da commit c1c925b
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 17 deletions.
6 changes: 0 additions & 6 deletions dashboard/packages/app/src/components/subnets/NodeSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ export default function NodeSearch({ onSearchChange, expand }: { onSearchChange:
hidden: false,
searchable: true,
},
{
title: 'Decentralized',
field: 'decentralized',
type: 'boolean',
hidden: false,
},
];


Expand Down
1 change: 0 additions & 1 deletion rs/decentralization/src/nakamoto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,6 @@ mod tests {
.sorted_by(|a, b| a.principal.cmp(&b.principal))
.filter(|n| n.subnet_id.is_none() && n.proposal.is_none())
.map(Node::from)
.map(|n| Node { decentralized: true, ..n })
.collect::<Vec<_>>();

subnet_healthy.check_business_rules().expect("Check business rules failed");
Expand Down
4 changes: 1 addition & 3 deletions rs/decentralization/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Node {
pub id: PrincipalId,
pub features: nakamoto::NodeFeatures,
pub dfinity_owned: bool,
pub decentralized: bool,
}

impl std::fmt::Display for Node {
Expand All @@ -42,12 +41,11 @@ impl std::fmt::Display for Node {
}

impl Node {
pub fn new_test_node(node_number: u64, features: nakamoto::NodeFeatures, dfinity_owned: bool, decentralized: bool) -> Self {
pub fn new_test_node(node_number: u64, features: nakamoto::NodeFeatures, dfinity_owned: bool) -> Self {
Node {
id: PrincipalId::new_node_test_id(node_number),
features,
dfinity_owned,
decentralized,
}
}

Expand Down
1 change: 0 additions & 1 deletion rs/ic-management-backend/src/lazy_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ impl LazyRegistry {
operator: operator.clone().unwrap_or_default(),
proposal: None,
label: guest.map(|g| g.name),
decentralized: ip_addr.segments()[4] == 0x6801,
duplicates: versioned_node_entries
.iter()
.filter(|(_, (_, nr2))| Self::node_ip_addr(nr2) == Self::node_ip_addr(nr))
Expand Down
1 change: 0 additions & 1 deletion rs/ic-management-backend/src/node_labels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pub async fn query_guests(network: &String) -> anyhow::Result<Vec<Guest>> {
ipv6: ip.parse().unwrap(),
name: format!("{}-{}", dc, label),
dfinity_owned: DFINITY_DCS.contains(dc),
decentralized: true,
}
})
.collect())
Expand Down
1 change: 0 additions & 1 deletion rs/ic-management-backend/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ impl RegistryState {
operator,
proposal: None,
label: guest.map(|g| g.name),
decentralized: ip_addr.segments()[4] == 0x6801,
duplicates: node_entries
.iter()
.filter(|(_, (_, nr2))| node_ip_addr(nr2) == node_ip_addr(nr))
Expand Down
1 change: 0 additions & 1 deletion rs/ic-management-backend/src/subnets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ mod tests {
},
subnet_id: Some(subnet_id),
hostos_release: None,
decentralized: true,
ip_addr: Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1),
hostname: None,
dfinity_owned: None,
Expand Down
3 changes: 0 additions & 3 deletions rs/ic-management-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ pub struct Node {
pub proposal: Option<TopologyChangeProposal>,
pub label: Option<String>,
#[serde(default)]
pub decentralized: bool,
pub duplicates: Option<PrincipalId>,
pub is_api_boundary_node: bool,
}
Expand Down Expand Up @@ -386,7 +385,6 @@ pub struct Guest {
pub ipv6: Ipv6Addr,
pub name: String,
pub dfinity_owned: bool,
pub decentralized: bool,
}

#[derive(Clone, Serialize, Deserialize, PartialEq, Hash, Eq)]
Expand All @@ -406,7 +404,6 @@ impl From<FactsDBGuest> for Guest {
ipv6: g.ipv6,
name: g.physical_system.split('.').next().expect("invalid physical system name").to_string(),
dfinity_owned: g.node_type.contains("dfinity"),
decentralized: g.ipv6.segments()[4] == 0x6801,
}
}
}
Expand Down

0 comments on commit c1c925b

Please sign in to comment.