/// Handle removing a subnet from the routing table.
Handle removing a subnet from the routing table.
Handle removing a subnet from the routing table .
pub fn remove_subnet_from_routing_table(
        &self,
        version: u64,
        subnet_id_to_remove: SubnetId,
    ) -> RegistryMutation {
        let RegistryValue {
            value: routing_table_vec,
            version: _,
            deletion_marker: _,
        } = self
            .get(make_routing_table_record_key().as_bytes(), version)
            .unwrap();
        let mut routing_table = RoutingTable::try_from(decode_registry_value::<pb::RoutingTable>(
            routing_table_vec.clone(),
        ))
        .expect("failed to decode the routing table from protobuf");
        routing_table.remove_subnet(subnet_id_to_remove);
        into_registry_mutation(routing_table, 1)
    }
pub fn remove_subnet_from_routing_table ( & self , version : u64 , subnet_id_to_remove : SubnetId , ) -> RegistryMutation { let RegistryValue { value : routing_table_vec , version : _ , deletion_marker : _ , } = self . get ( make_routing_table_record_key ( ) . as_bytes ( ) , version ) . unwrap ( ) ; let mut routing_table = RoutingTable :: try_from ( decode_registry_value :: < pb :: RoutingTable > ( routing_table_vec . clone ( ) , ) ) . expect ( " " ) ; routing_table . remove_subnet ( subnet_id_to_remove ) ; into_registry_mutation ( routing_table , 1 ) }
Handle removing a subnet from the routing table.
Handle removing a subnet from the routing table .
&self
version
u64
subnet_id_to_remove
SubnetId