fn run_uni_chan_path(self, path: UnidirectionalChannelPath) -> Result<(), BoxError> {
        let mut link = Link::new_from_opts(
            self.chains.a.clone(),
            self.chains.b.clone(),
            LinkParameters {
                src_port_id: path.src_port_id,
                src_channel_id: path.src_channel_id,
            },
        )?;

        if link.is_closed()? {
            warn!("channel is closed, exiting");
            return Ok(());
        }

        loop {
            if let Ok(cmd) = self.rx.try_recv() {
                match cmd {
                    WorkerCmd::PacketEvents { batch } => {
                        link.a_to_b.update_schedule(batch)?;
                        // Refresh the scheduled batches and execute any outstanding ones.
                    }
                    WorkerCmd::NewBlocks {
                        height,
                        new_blocks: _,
                    } => link.a_to_b.clear_packets(height)?,
                }
            }

            // Refresh the scheduled batches and execute any outstanding ones.
            link.a_to_b.refresh_schedule()?;
            link.a_to_b.execute_schedule()?;

            thread::sleep(Duration::from_millis(100))
        }
    }
/// Run the event loop for events associated with a [`UnidirectionalChannelPath`].
Run the event loop for events associated with a [`UnidirectionalChannelPath`].
Run the event loop for events associated with a [ ` UnidirectionalChannelPath ` ] .
fn run_uni_chan_path(self, path: UnidirectionalChannelPath) -> Result<(), BoxError> {
        let mut link = Link::new_from_opts(
            self.chains.a.clone(),
            self.chains.b.clone(),
            LinkParameters {
                src_port_id: path.src_port_id,
                src_channel_id: path.src_channel_id,
            },
        )?;
        if link.is_closed()? {
            warn!("channel is closed, exiting");
            return Ok(());
        }
        loop {
            if let Ok(cmd) = self.rx.try_recv() {
                match cmd {
                    WorkerCmd::PacketEvents { batch } => {
                        link.a_to_b.update_schedule(batch)?;
                        // Refresh the scheduled batches and execute any outstanding ones.
                    }
                    WorkerCmd::NewBlocks {
                        height,
                        new_blocks: _,
                    } => link.a_to_b.clear_packets(height)?,
                }
            }
            // Refresh the scheduled batches and execute any outstanding ones.
            link.a_to_b.refresh_schedule()?;
            link.a_to_b.execute_schedule()?;
            thread::sleep(Duration::from_millis(100))
        }
    }
fn run_uni_chan_path ( self , path : UnidirectionalChannelPath ) -> Result < ( ) , BoxError > { let mut link = Link :: new_from_opts ( self . chains . a . clone ( ) , self . chains . b . clone ( ) , LinkParameters { src_port_id : path . src_port_id , src_channel_id : path . src_channel_id , } , ) ? ; if link . is_closed ( ) ? { warn ! ( " " ) ; return Ok ( ( ) ) ; } loop { if let Ok ( cmd ) = self . rx . try_recv ( ) { match cmd { WorkerCmd :: PacketEvents { batch } => { link . a_to_b . update_schedule ( batch ) ? ; // Refresh the scheduled batches and execute any outstanding ones. } WorkerCmd :: NewBlocks { height , new_blocks : _ , } => link . a_to_b . clear_packets ( height ) ? , } } // Refresh the scheduled batches and execute any outstanding ones. link . a_to_b . refresh_schedule ( ) ? ; link . a_to_b . execute_schedule ( ) ? ; thread :: sleep ( Duration :: from_millis ( 100 ) ) } }
Run the event loop for events associated with a [`UnidirectionalChannelPath`].
Run the event loop for events associated with a [ ` UnidirectionalChannelPath ` ] .
self
path
UnidirectionalChannelPath
self
path
UnidirectionalChannelPath