async def on_channel_update(self, chan: Channel):
    if (type(chan) is ChannelBackup):
        util.trigger_callback('channel', self.wallet, chan)
        return
    if ((chan.get_state() == ChannelState.OPEN) and chan.should_be_closed_due_to_expiring_htlcs(self.network.get_local_height())):
        self.logger.info(f'force-closing due to expiring htlcs')
        (await self.try_force_closing(chan.channel_id))
    elif (chan.get_state() == ChannelState.FUNDED):
        peer = self._peers.get(chan.node_id)
        if (peer and peer.is_initialized()):
            peer.send_funding_locked(chan)
    elif (chan.get_state() == ChannelState.OPEN):
        peer = self._peers.get(chan.node_id)
        if peer:
            (await peer.maybe_update_fee(chan))
            conf = self.lnwatcher.get_tx_height(chan.funding_outpoint.txid).conf
            peer.on_network_update(chan, conf)
    elif (chan.get_state() == ChannelState.FORCE_CLOSING):
        force_close_tx = chan.force_close_tx()
        txid = force_close_tx.txid()
        height = self.lnwatcher.get_tx_height(txid).height
        if (height == TX_HEIGHT_LOCAL):
            self.logger.info('REBROADCASTING CLOSING TX')
            (await self.network.try_broadcasting(force_close_tx, 'force-close'))
async def on_channel_update(self, chan: Channel):
    if (type(chan) is ChannelBackup):
        util.trigger_callback('channel', self.wallet, chan)
        return
    if ((chan.get_state() == ChannelState.OPEN) and chan.should_be_closed_due_to_expiring_htlcs(self.network.get_local_height())):
        self.logger.info(f'force-closing due to expiring htlcs')
        (await self.try_force_closing(chan.channel_id))
    elif (chan.get_state() == ChannelState.FUNDED):
        peer = self._peers.get(chan.node_id)
        if (peer and peer.is_initialized()):
            peer.send_funding_locked(chan)
    elif (chan.get_state() == ChannelState.OPEN):
        peer = self._peers.get(chan.node_id)
        if peer:
            (await peer.maybe_update_fee(chan))
            conf = self.lnwatcher.get_tx_height(chan.funding_outpoint.txid).conf
            peer.on_network_update(chan, conf)
    elif (chan.get_state() == ChannelState.FORCE_CLOSING):
        force_close_tx = chan.force_close_tx()
        txid = force_close_tx.txid()
        height = self.lnwatcher.get_tx_height(txid).height
        if (height == TX_HEIGHT_LOCAL):
            self.logger.info('REBROADCASTING CLOSING TX')
            (await self.network.try_broadcasting(force_close_tx, 'force-close'))