@@ -488,7 +488,12 @@ impl AppMetrics {
488488
489489 /// Total number of missed consensus rounds since start.
490490 #[ cfg( test) ]
491- pub fn get_consensus_round_missed_count ( & self , proposer : Address , height : Height , round : Round ) -> u64 {
491+ pub fn get_consensus_round_missed_count (
492+ & self ,
493+ proposer : Address ,
494+ height : Height ,
495+ round : Round ,
496+ ) -> u64 {
492497 self . consensus_round_missed
493498 . get_or_create ( & RoundMissedLabel :: new ( proposer, height, round) )
494499 . get ( )
@@ -705,8 +710,17 @@ mod tests {
705710 metrics. inc_consensus_round_missed ( proposer, Height :: new ( 2 ) , Round :: new ( 0 ) ) ;
706711 metrics. inc_consensus_round_missed ( proposer, Height :: new ( 2 ) , Round :: new ( 1 ) ) ;
707712
708- assert_eq ! ( metrics. get_consensus_round_missed_count( proposer, Height :: new( 1 ) , Round :: new( 0 ) ) , 1 ) ;
709- assert_eq ! ( metrics. get_consensus_round_missed_count( proposer, Height :: new( 2 ) , Round :: new( 0 ) ) , 1 ) ;
710- assert_eq ! ( metrics. get_consensus_round_missed_count( proposer, Height :: new( 2 ) , Round :: new( 1 ) ) , 1 ) ;
713+ assert_eq ! (
714+ metrics. get_consensus_round_missed_count( proposer, Height :: new( 1 ) , Round :: new( 0 ) ) ,
715+ 1
716+ ) ;
717+ assert_eq ! (
718+ metrics. get_consensus_round_missed_count( proposer, Height :: new( 2 ) , Round :: new( 0 ) ) ,
719+ 1
720+ ) ;
721+ assert_eq ! (
722+ metrics. get_consensus_round_missed_count( proposer, Height :: new( 2 ) , Round :: new( 1 ) ) ,
723+ 1
724+ ) ;
711725 }
712726}
0 commit comments