// Merge node records from subnet_membership_version (provided by consensus)
// to latest_registry_version. This returns the current subnet membership set.
Merge node records from subnet_membership_version (provided by consensus)
to latest_registry_version. This returns the current subnet membership set.
Merge node records from subnet_membership_version ( provided by consensus ) to latest_registry_version . This returns the current subnet membership set .
fn merge_subnet_membership(
        &self,
        latest_registry_version: RegistryVersion,
    ) -> BTreeMap<NodeId, NodeRecord> {
        let subnet_membership_version = self.consensus_pool_cache.get_subnet_membership_version();
        let mut subnet_nodes = BTreeMap::new();
        // Iterate from subnet_membership_version to latest_registry_version + 1 (since
        // end is non-inclusive).
        for version in subnet_membership_version.get()..=latest_registry_version.get() {
            let version = RegistryVersion::from(version);
            let node_records = self
                .registry_client
                .get_subnet_transport_infos(self.subnet_id, version)
                .unwrap_or(None)
                .unwrap_or_else(Vec::new);
            for node in node_records {
                subnet_nodes.insert(node.0, node.1);
            }
        }
        subnet_nodes
    }
fn merge_subnet_membership ( & self , latest_registry_version : RegistryVersion , ) -> BTreeMap < NodeId , NodeRecord > { let subnet_membership_version = self . consensus_pool_cache . get_subnet_membership_version ( ) ; let mut subnet_nodes = BTreeMap :: new ( ) ; // Iterate from subnet_membership_version to latest_registry_version + 1 (since // end is non-inclusive). for version in subnet_membership_version . get ( ) ..= latest_registry_version . get ( ) { let version = RegistryVersion :: from ( version ) ; let node_records = self . registry_client . get_subnet_transport_infos ( self . subnet_id , version ) . unwrap_or ( None ) . unwrap_or_else ( Vec :: new ) ; for node in node_records { subnet_nodes . insert ( node . 0 , node . 1 ) ; } } subnet_nodes }
Merge node records from subnet_membership_version (provided by consensus)
to latest_registry_version.
Merge node records from subnet_membership_version ( provided by consensus ) to latest_registry_version .
&self
latest_registry_version
RegistryVersion