(&mut self)
| 747 | } |
| 748 | |
| 749 | fn proc_commit(&mut self) { |
| 750 | let result = self.lock_status.clone().expect("No lock when commit!"); |
| 751 | self.send_bft_msg(BftMsg::Commit(Commit { |
| 752 | height: self.height, |
| 753 | round: self.round, |
| 754 | proposal: result.clone().proposal, |
| 755 | lock_votes: self.lock_status.clone().unwrap().votes, |
| 756 | address: self.params.clone().address, |
| 757 | })); |
| 758 | |
| 759 | info!( |
| 760 | "Commit {:?} at height {:?}, consensus time {:?}", |
| 761 | result.clone().proposal, |
| 762 | self.height, |
| 763 | Instant::now() - self.htime |
| 764 | ); |
| 765 | |
| 766 | self.last_commit_round = Some(self.round); |
| 767 | self.last_commit_proposal = Some(result.proposal); |
| 768 | } |
| 769 | |
| 770 | fn set_polc(&mut self, hash: &Target, voteset: &VoteSet, vote_type: VoteType) { |
| 771 | self.proposal = Some(hash.to_owned()); |
no test coverage detected