/// Increments the node height by one and resets previous height data.
Increments the node height by one and resets previous height data.
Increments the node height by one and resets previous height data .
pub(super) fn new_height(&mut self, block_hash: &Hash, height_start_time: SystemTime) {
        self.height.increment();
        self.height_start_time = height_start_time;
        self.round = Round::first();
        self.locked_round = Round::zero();
        self.locked_propose = None;
        self.last_hash = *block_hash;
        // TODO: Destruct/construct structure HeightState instead of call clear. (ECR-171)
        self.blocks.clear();
        self.proposes.clear();
        self.precommits_confirmed_by_majority.clear();
        self.prevotes.clear();
        self.precommits.clear();
        self.validators_rounds.clear();
        if let Some(ref mut validator_state) = self.validator_state {
            validator_state.clear();
        }
        self.requests.clear(); // FIXME: Clear all timeouts. (ECR-171)
        self.incomplete_block = None;
        self.invalid_txs.clear();
    }
pub ( super ) fn new_height ( & mut self , block_hash : & Hash , height_start_time : SystemTime ) { self . height . increment ( ) ; self . height_start_time = height_start_time ; self . round = Round :: first ( ) ; self . locked_round = Round :: zero ( ) ; self . locked_propose = None ; self . last_hash = * block_hash ; // TODO: Destruct/construct structure HeightState instead of call clear. (ECR-171) self . blocks . clear ( ) ; self . proposes . clear ( ) ; self . precommits_confirmed_by_majority . clear ( ) ; self . prevotes . clear ( ) ; self . precommits . clear ( ) ; self . validators_rounds . clear ( ) ; if let Some ( ref mut validator_state ) = self . validator_state { validator_state . clear ( ) ; } self . requests . clear ( ) ; // FIXME: Clear all timeouts. (ECR-171) self . incomplete_block = None ; self . invalid_txs . clear ( ) ; }
Increments the node height by one and resets previous height data.
Increments the node height by one and resets previous height data .
&mut self
block_hash
&Hash
height_start_time
SystemTime