@@ -474,7 +474,7 @@ impl<ContextT: ConsensusContext> MultiHeightManager<ContextT> {
474474 CONSENSUS_BLOCK_NUMBER . set_lossy ( height. 0 ) ;
475475 self . cache . report_max_cached_block_number_metric ( height) ;
476476
477- if let Some ( sync_result) = self . check_and_wait_for_sync ( context, height) . await ? {
477+ if let Some ( sync_result) = self . check_and_wait_for_sync ( context, height) . await {
478478 return Ok ( sync_result) ;
479479 }
480480
@@ -501,12 +501,12 @@ impl<ContextT: ConsensusContext> MultiHeightManager<ContextT> {
501501 }
502502
503503 /// Check if we need to sync and wait if necessary.
504- /// Returns Some(RunHeightRes::Sync) if sync is needed , None otherwise.
504+ /// Returns Some(RunHeightRes::Sync) if sync height was learned via sync , None otherwise.
505505 async fn check_and_wait_for_sync (
506506 & mut self ,
507507 context : & mut ContextT ,
508508 height : BlockNumber ,
509- ) -> Result < Option < RunHeightRes > , ConsensusError > {
509+ ) -> Option < RunHeightRes > {
510510 // If we already voted for this height, do not proceed until we sync to this height.
511511 // Otherwise, just check if we can sync to this height, immediately. If not, proceed with
512512 // consensus.
@@ -522,11 +522,11 @@ impl<ContextT: ConsensusContext> MultiHeightManager<ContextT> {
522522 self . last_voted_height_at_initialization. unwrap( ) . 0
523523 ) ;
524524 self . wait_until_sync_reaches_height ( height, context) . await ;
525- return Ok ( Some ( RunHeightRes :: Sync ) ) ;
525+ return Some ( RunHeightRes :: Sync ) ;
526526 } else if context. try_sync ( height) . await {
527- return Ok ( Some ( RunHeightRes :: Sync ) ) ;
527+ return Some ( RunHeightRes :: Sync ) ;
528528 }
529- Ok ( None )
529+ None
530530 }
531531
532532 /// Initialize consensus for a height: get validators, create SHC, and set up events.
0 commit comments