Skip to content

Commit

Permalink
Replace integer with block::Round
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence committed Nov 15, 2021
1 parent 243452d commit fde6080
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tendermint/src/abci/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub struct LastCommitInfo {
///
/// Reflects the total number of rounds it took to come to consensus for the
/// current block.
pub round: i32,
pub round: block::Round,
/// The list of validator addresses in the last validator set, with their
/// voting power and whether or not they signed a vote.
pub votes: Vec<VoteInfo>,
Expand Down Expand Up @@ -252,7 +252,7 @@ impl Protobuf<pb::Evidence> for Evidence {}
impl From<LastCommitInfo> for pb::LastCommitInfo {
fn from(lci: LastCommitInfo) -> Self {
Self {
round: lci.round,
round: lci.round.into(),
votes: lci.votes.into_iter().map(Into::into).collect(),
}
}
Expand All @@ -263,7 +263,7 @@ impl TryFrom<pb::LastCommitInfo> for LastCommitInfo {

fn try_from(lci: pb::LastCommitInfo) -> Result<Self, Self::Error> {
Ok(Self {
round: lci.round,
round: lci.round.try_into()?,
votes: lci
.votes
.into_iter()
Expand Down

0 comments on commit fde6080

Please sign in to comment.