fn invoke_state_sync(&self, pool: &PoolReader<'_>) {
        let catch_up_package = pool.get_highest_catch_up_package();
        let catch_up_height = catch_up_package.height();
        if self.message_routing.expected_batch_height() < catch_up_height {
            // if message routing expects a batch for a height smaller than the
            // height of the latest CUP, we will need to invoke state sync, as
            // the artifacts lower than the CUP height are purged
            let cup_interval_length = catch_up_package
                .content
                .block
                .into_inner()
                .payload
                .as_ref()
                .as_summary()
                .dkg
                .interval_length;

            self.state_manager.fetch_state(
                catch_up_height,
                catch_up_package.content.state_hash,
                cup_interval_length,
            );
        }
    }
/// Invoke state sync if required. This will call fetch_state repeatedly
/// as needed, because state sync (or matching against existing state hash
/// during recovery) happens asynchronously.
Invoke state sync if required. This will call fetch_state repeatedly
as needed, because state sync (or matching against existing state hash
during recovery) happens asynchronously.
Invoke state sync if required . This will call fetch_state repeatedly as needed because state sync ( or matching against existing state hash during recovery ) happens asynchronously .
fn invoke_state_sync(&self, pool: &PoolReader<'_>) {
        let catch_up_package = pool.get_highest_catch_up_package();
        let catch_up_height = catch_up_package.height();
        if self.message_routing.expected_batch_height() < catch_up_height {
            // if message routing expects a batch for a height smaller than the
            // height of the latest CUP, we will need to invoke state sync, as
            // the artifacts lower than the CUP height are purged
            let cup_interval_length = catch_up_package
                .content
                .block
                .into_inner()
                .payload
                .as_ref()
                .as_summary()
                .dkg
                .interval_length;
            self.state_manager.fetch_state(
                catch_up_height,
                catch_up_package.content.state_hash,
                cup_interval_length,
            );
        }
    }
fn invoke_state_sync ( & self , pool : & PoolReader < ' _ > ) { let catch_up_package = pool . get_highest_catch_up_package ( ) ; let catch_up_height = catch_up_package . height ( ) ; if self . message_routing . expected_batch_height ( ) < catch_up_height { // if message routing expects a batch for a height smaller than the // height of the latest CUP, we will need to invoke state sync, as // the artifacts lower than the CUP height are purged let cup_interval_length = catch_up_package . content . block . into_inner ( ) . payload . as_ref ( ) . as_summary ( ) . dkg . interval_length ; self . state_manager . fetch_state ( catch_up_height , catch_up_package . content . state_hash , cup_interval_length , ) ; } }
Invoke state sync if required.
Invoke state sync if required .
&self
pool
&PoolReader<'_>
&self
pool
&PoolReader<'_>