pub fn new(
        subnet_id: SubnetId,
        catch_up_package: CUPWithOriginalProtobuf,
        config: ArtifactPoolConfig,
        registry: ic_metrics::MetricsRegistry,
        log: ReplicaLogger,
    ) -> ConsensusPoolImpl {
        let mut pool = UncachedConsensusPoolImpl::new(config.clone(), log.clone());
        Self::init_genesis(catch_up_package, pool.validated.as_mut());
        let mut pool = Self::from_uncached(pool, registry.clone());
        // If the back up directory is set, instantiate the backup component
        // and create a subdirectory with the subnet id as directory name.
        pool.backup = config.backup_spool_path.map(|path| {
            Backup::new(
                &pool,
                path.clone(),
                path.join(subnet_id.to_string())
                    .join(ic_types::ReplicaVersion::default().to_string()),
                BACKUP_RETENTION_TIME_SECS,
                BACKUP_PURGING_INTERVAL_SEC,
                registry,
                log,
            )
        });
        pool
    }
/// Create a consensus pool from a given `config`, and initialize it with
/// the given `catch_up_package`. If a catch-up package already exists in
/// the validated pool, the one that is greater (with respect to
/// height and registry version) will be used.
Create a consensus pool from a given `config`, and initialize it with
the given `catch_up_package`. If a catch-up package already exists in
the validated pool, the one that is greater (with respect to
height and registry version) will be used.
Create a consensus pool from a given ` config ` and initialize it with the given ` catch_up_package ` . If a catch - up package already exists in the validated pool the one that is greater ( with respect to height and registry version ) will be used .
pub fn new(
        subnet_id: SubnetId,
        catch_up_package: CUPWithOriginalProtobuf,
        config: ArtifactPoolConfig,
        registry: ic_metrics::MetricsRegistry,
        log: ReplicaLogger,
    ) -> ConsensusPoolImpl {
        let mut pool = UncachedConsensusPoolImpl::new(config.clone(), log.clone());
        Self::init_genesis(catch_up_package, pool.validated.as_mut());
        let mut pool = Self::from_uncached(pool, registry.clone());
        // If the back up directory is set, instantiate the backup component
        // and create a subdirectory with the subnet id as directory name.
        pool.backup = config.backup_spool_path.map(|path| {
            Backup::new(
                &pool,
                path.clone(),
                path.join(subnet_id.to_string())
                    .join(ic_types::ReplicaVersion::default().to_string()),
                BACKUP_RETENTION_TIME_SECS,
                BACKUP_PURGING_INTERVAL_SEC,
                registry,
                log,
            )
        });
        pool
    }
pub fn new ( subnet_id : SubnetId , catch_up_package : CUPWithOriginalProtobuf , config : ArtifactPoolConfig , registry : ic_metrics :: MetricsRegistry , log : ReplicaLogger , ) -> ConsensusPoolImpl { let mut pool = UncachedConsensusPoolImpl :: new ( config . clone ( ) , log . clone ( ) ) ; Self :: init_genesis ( catch_up_package , pool . validated . as_mut ( ) ) ; let mut pool = Self :: from_uncached ( pool , registry . clone ( ) ) ; // If the back up directory is set, instantiate the backup component // and create a subdirectory with the subnet id as directory name. pool . backup = config . backup_spool_path . map ( | path | { Backup :: new ( & pool , path . clone ( ) , path . join ( subnet_id . to_string ( ) ) . join ( ic_types :: ReplicaVersion :: default ( ) . to_string ( ) ) , BACKUP_RETENTION_TIME_SECS , BACKUP_PURGING_INTERVAL_SEC , registry , log , ) } ) ; pool }
Create a consensus pool from a given `config`, and initialize it with
the given `catch_up_package`.
Create a consensus pool from a given ` config ` and initialize it with the given ` catch_up_package ` .
subnet_id
SubnetId
catch_up_package
CUPWithOriginalProtobuf
config
ArtifactPoolConfig
registry
ic_metrics::MetricsRegistry
log
ReplicaLogger
subnet_id
SubnetId
catch_up_package
CUPWithOriginalProtobuf
config
ArtifactPoolConfig
registry
ic_metrics::MetricsRegistry
log
ReplicaLogger