(max_subnets: usize, static_subnets: Vec<SubnetID>)
| 42 | |
| 43 | impl SubnetProviderCache { |
| 44 | pub fn new(max_subnets: usize, static_subnets: Vec<SubnetID>) -> Self { |
| 45 | Self { |
| 46 | pinned_subnets: HashSet::from_iter(static_subnets), |
| 47 | max_subnets, |
| 48 | routable_peers: Default::default(), |
| 49 | subnet_providers: Default::default(), |
| 50 | peer_timestamps: Default::default(), |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /// Pin a subnet, after which it won't be pruned. |
| 55 | pub fn pin_subnet(&mut self, subnet_id: SubnetID) { |
nothing calls this directly
no outgoing calls
no test coverage detected