fn propose(
            &mut self,
            vidx: ValidatorIndex,
            cv: <TestContext as Context>::ConsensusValue,
            block_context: BlockContext<TestContext>,
        ) -> (Vec<Effect<TestContext>>, SignedWireUnit<TestContext>) {
            let validator = &mut self.active_validators[vidx];
            let proposal_timestamp = block_context.timestamp();
            let effects = validator.propose(cv, block_context, &self.state, self.instance_id);

            // Add the new unit to the state.
            let proposal_wunit = unwrap_single(&effects).unwrap_unit();
            let prop_hash = proposal_wunit.hash();
            self.state.add_unit(proposal_wunit.clone()).unwrap();
            let effects = validator.on_new_unit(
                &prop_hash,
                proposal_timestamp + 1.into(),
                &self.state,
                self.instance_id,
            );
            self.schedule_timer(vidx, &effects);
            (effects, proposal_wunit)
        }
/// Propose new consensus value as validator `vidx`.
/// Returns effects created when proposing and newly proposed wire unit.
Propose new consensus value as validator `vidx`.
Returns effects created when proposing and newly proposed wire unit.
Propose new consensus value as validator ` vidx ` . Returns effects created when proposing and newly proposed wire unit .
fn propose(
            &mut self,
            vidx: ValidatorIndex,
            cv: <TestContext as Context>::ConsensusValue,
            block_context: BlockContext<TestContext>,
        ) -> (Vec<Effect<TestContext>>, SignedWireUnit<TestContext>) {
            let validator = &mut self.active_validators[vidx];
            let proposal_timestamp = block_context.timestamp();
            let effects = validator.propose(cv, block_context, &self.state, self.instance_id);
            // Add the new unit to the state.
            let proposal_wunit = unwrap_single(&effects).unwrap_unit();
            let prop_hash = proposal_wunit.hash();
            self.state.add_unit(proposal_wunit.clone()).unwrap();
            let effects = validator.on_new_unit(
                &prop_hash,
                proposal_timestamp + 1.into(),
                &self.state,
                self.instance_id,
            );
            self.schedule_timer(vidx, &effects);
            (effects, proposal_wunit)
        }
fn propose ( & mut self , vidx : ValidatorIndex , cv : < TestContext as Context > :: ConsensusValue , block_context : BlockContext < TestContext > , ) -> ( Vec < Effect < TestContext > > , SignedWireUnit < TestContext > ) { let validator = & mut self . active_validators [ vidx ] ; let proposal_timestamp = block_context . timestamp ( ) ; let effects = validator . propose ( cv , block_context , & self . state , self . instance_id ) ; // Add the new unit to the state. let proposal_wunit = unwrap_single ( & effects ) . unwrap_unit ( ) ; let prop_hash = proposal_wunit . hash ( ) ; self . state . add_unit ( proposal_wunit . clone ( ) ) . unwrap ( ) ; let effects = validator . on_new_unit ( & prop_hash , proposal_timestamp + 1 . into ( ) , & self . state , self . instance_id , ) ; self . schedule_timer ( vidx , & effects ) ; ( effects , proposal_wunit ) }
Propose new consensus value as validator `vidx`.
Propose new consensus value as validator ` vidx ` .
&mut self
vidx
ValidatorIndex
cv
<TestContext as Context>::ConsensusValue
block_context
BlockContext<TestContext>
&mut self
vidx
ValidatorIndex
cv
<TestContext as Context>::ConsensusValue
block_context
BlockContext<TestContext>