From 9ff7033acf9635a30b190f3315a06f2b6177a8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20Tomi=C4=87?= Date: Wed, 13 Nov 2024 10:17:44 +0100 Subject: [PATCH] feat(dre,registry): add nodes_in_registry field to NodeOperator --- rs/cli/src/commands/registry.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rs/cli/src/commands/registry.rs b/rs/cli/src/commands/registry.rs index 7d58ebeff..fc0c2b4ad 100644 --- a/rs/cli/src/commands/registry.rs +++ b/rs/cli/src/commands/registry.rs @@ -193,6 +193,7 @@ async fn get_node_operators(local_registry: &Arc, network: &Ne .iter() .filter(|(_, value)| value.operator.principal == record.principal && value.subnet_id.is_some()) .count() as u64; + let nodes_in_registry = all_nodes.iter().filter(|(_, value)| value.operator.principal == record.principal).count() as u64; ( record.principal, NodeOperator { @@ -208,6 +209,7 @@ async fn get_node_operators(local_registry: &Arc, network: &Ne nodes_health: Default::default(), rewards_correct: false, nodes_in_subnets, + nodes_in_registry, }, ) }) @@ -523,6 +525,7 @@ struct NodeOperator { nodes_health: IndexMap>, rewards_correct: bool, nodes_in_subnets: u64, + nodes_in_registry: u64, } // We re-create the rewards structs here in order to convert the output of get-rewards-table into the format