fn dkg_payload_builder_fn(
    subnet_id: SubnetId,
    registry_client: Arc<dyn RegistryClient>,
    crypto: Arc<CryptoReturningOk>,
    state_manager: Arc<dyn StateManager<State = ReplicatedState>>,
    dkg_pool: Arc<RwLock<dyn DkgPool>>,
) -> Box<dyn Fn(&dyn ConsensusPool, Block, &ValidationContext) -> consensus::dkg::Payload> {
    Box::new(move |cons_pool, parent, validation_context| {
        ic_consensus::dkg::create_payload(
            subnet_id,
            &*registry_client,
            &*crypto,
            &PoolReader::new(cons_pool),
            dkg_pool.clone(),
            &parent,
            &*state_manager,
            validation_context,
            no_op_logger(),
            10, // at most dealings per block
            0,  // dealings age in secs
        )
        .unwrap_or_else(|err| panic!("Couldn't create the payload: {:?}", err))
    })
}
// Return a closure building DKG payloads. Used in tests only.
Return a closure building DKG payloads. Used in tests only.
Return a closure building DKG payloads . Used in tests only .
fn dkg_payload_builder_fn(
    subnet_id: SubnetId,
    registry_client: Arc<dyn RegistryClient>,
    crypto: Arc<CryptoReturningOk>,
    state_manager: Arc<dyn StateManager<State = ReplicatedState>>,
    dkg_pool: Arc<RwLock<dyn DkgPool>>,
) -> Box<dyn Fn(&dyn ConsensusPool, Block, &ValidationContext) -> consensus::dkg::Payload> {
    Box::new(move |cons_pool, parent, validation_context| {
        ic_consensus::dkg::create_payload(
            subnet_id,
            &*registry_client,
            &*crypto,
            &PoolReader::new(cons_pool),
            dkg_pool.clone(),
            &parent,
            &*state_manager,
            validation_context,
            no_op_logger(),
            10, // at most dealings per block
            0,  // dealings age in secs
        )
        .unwrap_or_else(|err| panic!("Couldn't create the payload: {:?}", err))
    })
}
fn dkg_payload_builder_fn ( subnet_id : SubnetId , registry_client : Arc < dyn RegistryClient > , crypto : Arc < CryptoReturningOk > , state_manager : Arc < dyn StateManager < State = ReplicatedState > > , dkg_pool : Arc < RwLock < dyn DkgPool > > , ) -> Box < dyn Fn ( & dyn ConsensusPool , Block , & ValidationContext ) -> consensus :: dkg :: Payload > { Box :: new ( move | cons_pool , parent , validation_context | { ic_consensus :: dkg :: create_payload ( subnet_id , & * registry_client , & * crypto , & PoolReader :: new ( cons_pool ) , dkg_pool . clone ( ) , & parent , & * state_manager , validation_context , no_op_logger ( ) , 10 , // at most dealings per block 0 , // dealings age in secs ) . unwrap_or_else ( | err | panic ! ( " " err ) ) } ) }
Return a closure building DKG payloads.
Return a closure building DKG payloads .
subnet_id
SubnetId
registry_client
Arc<dyn RegistryClient>
crypto
Arc<CryptoReturningOk>
state_manager
Arc<dyn StateManager<State = ReplicatedState>>
dkg_pool
Arc<RwLock<dyn DkgPool>>
subnet_id
SubnetId
registry_client
Arc<dyn RegistryClient>
crypto
Arc<CryptoReturningOk>
state_manager
Arc<dyn StateManager<State = ReplicatedState>>
dkg_pool
Arc<RwLock<dyn DkgPool>>