pub fn init_dkg(&mut self, threshold: usize) -> Result<Message<NodeID>, Error> {
        let mut inner_locked = self.inner.lock().unwrap();

        // Extract public_keys of the nodes from the given group for DKG
        let pub_keys = inner_locked
            .group
            .keys()
            .fold(BTreeSet::new(), |mut set, key| {
                let _ = set.insert(key.clone());
                set
            });

        // Initialize DKG
        let (key_gen, broadcast_msg) =
            KeyGen::initialize(&inner_locked.our_keys, threshold, pub_keys)?;

        inner_locked.key_gen = Some(key_gen);
        Ok(broadcast_msg)
    }
/// Initialize DKG with the connected nodes and returns back the proposal
Initialize DKG with the connected nodes and returns back the proposal
Initialize DKG with the connected nodes and returns back the proposal
pub fn init_dkg(&mut self, threshold: usize) -> Result<Message<NodeID>, Error> {
        let mut inner_locked = self.inner.lock().unwrap();
        // Extract public_keys of the nodes from the given group for DKG
        let pub_keys = inner_locked
            .group
            .keys()
            .fold(BTreeSet::new(), |mut set, key| {
                let _ = set.insert(key.clone());
                set
            });
        // Initialize DKG
        let (key_gen, broadcast_msg) =
            KeyGen::initialize(&inner_locked.our_keys, threshold, pub_keys)?;
        inner_locked.key_gen = Some(key_gen);
        Ok(broadcast_msg)
    }
pub fn init_dkg ( & mut self , threshold : usize ) -> Result < Message < NodeID > , Error > { let mut inner_locked = self . inner . lock ( ) . unwrap ( ) ; // Extract public_keys of the nodes from the given group for DKG let pub_keys = inner_locked . group . keys ( ) . fold ( BTreeSet :: new ( ) , | mut set , key | { let _ = set . insert ( key . clone ( ) ) ; set } ) ; // Initialize DKG let ( key_gen , broadcast_msg ) = KeyGen :: initialize ( & inner_locked . our_keys , threshold , pub_keys ) ? ; inner_locked . key_gen = Some ( key_gen ) ; Ok ( broadcast_msg ) }
Initialize DKG with the connected nodes and returns back the proposal
Initialize DKG with the connected nodes and returns back the proposal
&mut self
threshold
usize