diff --git a/tendermint/src/abci/types.rs b/tendermint/src/abci/types.rs index 920a95ce5..30dc0cded 100644 --- a/tendermint/src/abci/types.rs +++ b/tendermint/src/abci/types.rs @@ -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, @@ -252,7 +252,7 @@ impl Protobuf for Evidence {} impl From 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(), } } @@ -263,7 +263,7 @@ impl TryFrom for LastCommitInfo { fn try_from(lci: pb::LastCommitInfo) -> Result { Ok(Self { - round: lci.round, + round: lci.round.try_into()?, votes: lci .votes .into_iter()