/// Create a new random transcript config and advance the
/// next_unused_transcript_id by one.
Create a new random transcript config and advance the
next_unused_transcript_id by one.
Create a new random transcript config and advance the next_unused_transcript_id by one .
fn new_random_config(
    subnet_nodes: &[NodeId],
    summary_registry_version: RegistryVersion,
    next_unused_transcript_id: &mut IDkgTranscriptId,
) -> Result<ecdsa::RandomTranscriptParams, EcdsaPayloadError> {
    let transcript_id = *next_unused_transcript_id;
    *next_unused_transcript_id = transcript_id.increment();
    let dealers = IDkgDealers::new(subnet_nodes.iter().copied().collect::<BTreeSet<_>>())?;
    let receivers = IDkgReceivers::new(subnet_nodes.iter().copied().collect::<BTreeSet<_>>())?;
    Ok(ecdsa::RandomTranscriptParams::new(
        transcript_id,
        dealers,
        receivers,
        summary_registry_version,
        AlgorithmId::ThresholdEcdsaSecp256k1,
        IDkgTranscriptOperation::Random,
    )?)
}
fn new_random_config ( subnet_nodes : & [ NodeId ] , summary_registry_version : RegistryVersion , next_unused_transcript_id : & mut IDkgTranscriptId , ) -> Result < ecdsa :: RandomTranscriptParams , EcdsaPayloadError > { let transcript_id = * next_unused_transcript_id ; * next_unused_transcript_id = transcript_id . increment ( ) ; let dealers = IDkgDealers :: new ( subnet_nodes . iter ( ) . copied ( ) . collect :: < BTreeSet < _ > > ( ) ) ? ; let receivers = IDkgReceivers :: new ( subnet_nodes . iter ( ) . copied ( ) . collect :: < BTreeSet < _ > > ( ) ) ? ; Ok ( ecdsa :: RandomTranscriptParams :: new ( transcript_id , dealers , receivers , summary_registry_version , AlgorithmId :: ThresholdEcdsaSecp256k1 , IDkgTranscriptOperation :: Random , ) ? ) }
Create a new random transcript config and advance the
next_unused_transcript_id by one.
Create a new random transcript config and advance the next_unused_transcript_id by one .
subnet_nodes
&[NodeId]
summary_registry_version
RegistryVersion
next_unused_transcript_id
&mut IDkgTranscriptId