/// Decides on a value and broadcasts a `Term` message with that value.
Decides on a value and broadcasts a `Term` message with that value.
Decides on a value and broadcasts a ` Term ` message with that value .
fn decide(&mut self, b: bool) -> Step<N> {
        if self.decision.is_some() {
            return Step::default();
        }
        // Output the Binary Agreement value.
        let mut step = Step::default();
        step.output.push(b);
        // Latch the decided state.
        self.decision = Some(b);
        debug!("{}: decision: {}", self, b);
        if self.netinfo.is_validator() {
            let msg = MessageContent::Term(b).with_epoch(self.epoch + 1);
            step.messages.push(Target::all().message(msg));
        }
        step
    }
fn decide ( & mut self , b : bool ) -> Step < N > { if self . decision . is_some ( ) { return Step :: default ( ) ; } // Output the Binary Agreement value. let mut step = Step :: default ( ) ; step . output . push ( b ) ; // Latch the decided state. self . decision = Some ( b ) ; debug ! ( " " self b ) ; if self . netinfo . is_validator ( ) { let msg = MessageContent :: Term ( b ) . with_epoch ( self . epoch + 1 ) ; step . messages . push ( Target :: all ( ) . message ( msg ) ) ; } step }
Decides on a value and broadcasts a `Term` message with that value.
Decides on a value and broadcasts a ` Term ` message with that value .
&mut self
b
bool