fn deliver_batches(
        &self,
        message_routing: &dyn MessageRouting,
        pool: &PoolReader<'_>,
        replay_target_height: Option<Height>,
    ) -> Height {
        let expected_batch_height = message_routing.expected_batch_height();
        let last_batch_height = loop {
            match deliver_batches(
                message_routing,
                pool,
                &*self.state_manager,
                &*self.registry,
                self.subnet_id,
                self.replica_version.clone(),
                &self._log,
                replay_target_height,
                None,
            ) {
                Ok(h) => break h,
                Err(MessageRoutingError::QueueIsFull) => std::thread::sleep(WAIT_DURATION),
                Err(MessageRoutingError::Ignored { .. }) => {
                    unreachable!();
                }
            }
        };
        println!(
            "latest_batch_height = {}, batches = {}",
            last_batch_height,
            last_batch_height - expected_batch_height.decrement()
        );
        println!("Delivered batches up to the height {}", last_batch_height);
        last_batch_height
    }
/// Deliver finalized batches since last expected batch height.
Deliver finalized batches since last expected batch height.
Deliver finalized batches since last expected batch height .
fn deliver_batches(
        &self,
        message_routing: &dyn MessageRouting,
        pool: &PoolReader<'_>,
        replay_target_height: Option<Height>,
    ) -> Height {
        let expected_batch_height = message_routing.expected_batch_height();
        let last_batch_height = loop {
            match deliver_batches(
                message_routing,
                pool,
                &*self.state_manager,
                &*self.registry,
                self.subnet_id,
                self.replica_version.clone(),
                &self._log,
                replay_target_height,
                None,
            ) {
                Ok(h) => break h,
                Err(MessageRoutingError::QueueIsFull) => std::thread::sleep(WAIT_DURATION),
                Err(MessageRoutingError::Ignored { .. }) => {
                    unreachable!();
                }
            }
        };
        println!(
            "latest_batch_height = {}, batches = {}",
            last_batch_height,
            last_batch_height - expected_batch_height.decrement()
        );
        println!("Delivered batches up to the height {}", last_batch_height);
        last_batch_height
    }
fn deliver_batches ( & self , message_routing : & dyn MessageRouting , pool : & PoolReader < ' _ > , replay_target_height : Option < Height > , ) -> Height { let expected_batch_height = message_routing . expected_batch_height ( ) ; let last_batch_height = loop { match deliver_batches ( message_routing , pool , & * self . state_manager , & * self . registry , self . subnet_id , self . replica_version . clone ( ) , & self . _log , replay_target_height , None , ) { Ok ( h ) => break h , Err ( MessageRoutingError :: QueueIsFull ) => std :: thread :: sleep ( WAIT_DURATION ) , Err ( MessageRoutingError :: Ignored { .. } ) => { unreachable ! ( ) ; } } } ; println ! ( " " last_batch_height last_batch_height expected_batch_height decrement ( ) ) ; println ! ( " " last_batch_height ) ; last_batch_height }
Deliver finalized batches since last expected batch height.
Deliver finalized batches since last expected batch height .
&self
message_routing
&dyn MessageRouting
pool
&PoolReader<'_>
replay_target_height
Option<Height>
&self
message_routing
&dyn MessageRouting
pool
&PoolReader<'_>
replay_target_height
Option<Height>