// Copyright 2022-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 use crate::support::caching::Cache; use nym_mixnet_contract_common::{ families::FamilyHead, GatewayBond, IdentityKey, Interval, MixId, MixNodeDetails, RewardingParams, }; use nym_service_provider_directory_common::ServiceInfo; use std::collections::HashSet; pub(crate) struct ValidatorCacheData { pub(crate) mixnodes: Cache>, pub(crate) gateways: Cache>, pub(crate) mixnodes_blacklist: Cache>, pub(crate) gateways_blacklist: Cache>, pub(crate) rewarded_set: Cache>, pub(crate) active_set: Cache>, pub(crate) current_reward_params: Cache>, pub(crate) current_interval: Cache>, pub(crate) mix_to_family: Cache>, pub(crate) service_providers: Cache>, } impl ValidatorCacheData { pub(crate) fn new() -> Self { ValidatorCacheData { mixnodes: Cache::default(), gateways: Cache::default(), rewarded_set: Cache::default(), active_set: Cache::default(), mixnodes_blacklist: Cache::default(), gateways_blacklist: Cache::default(), current_interval: Cache::default(), current_reward_params: Cache::default(), mix_to_family: Cache::default(), service_providers: Cache::default(), } } }