/// Handles a step returned from the `ThresholdSign`.
Handles a step returned from the `ThresholdSign`.
Handles a step returned from the ` ThresholdSign ` .
fn on_coin_step(&mut self, ts_step: threshold_sign::Step<N>) -> Result<Step<N>> {
        let mut step = Step::default();
        let epoch = self.epoch;
        let to_msg = |c_msg| MessageContent::Coin(Box::new(c_msg)).with_epoch(epoch);
        let ts_output = step.extend_with(ts_step, FaultKind::CoinFault, to_msg);
        if let Some(sig) = ts_output.into_iter().next() {
            // Take the parity of the signature as the coin value.
            self.coin_state = sig.parity().into();
            step.extend(self.try_update_epoch()?);
        }
        Ok(step)
    }
fn on_coin_step ( & mut self , ts_step : threshold_sign :: Step < N > ) -> Result < Step < N > > { let mut step = Step :: default ( ) ; let epoch = self . epoch ; let to_msg = | c_msg | MessageContent :: Coin ( Box :: new ( c_msg ) ) . with_epoch ( epoch ) ; let ts_output = step . extend_with ( ts_step , FaultKind :: CoinFault , to_msg ) ; if let Some ( sig ) = ts_output . into_iter ( ) . next ( ) { // Take the parity of the signature as the coin value. self . coin_state = sig . parity ( ) . into ( ) ; step . extend ( self . try_update_epoch ( ) ? ) ; } Ok ( step ) }
Handles a step returned from the `ThresholdSign`.
Handles a step returned from the ` ThresholdSign ` .
&mut self
ts_step
threshold_sign::Step<N>