def _handle_chanupd_from_failed_htlc(self, payload, *, route, sender_idx) -> Tuple[(bool, bool)]:
    blacklist = False
    update = False
    try:
        r = self.channel_db.add_channel_update(payload, verify=True)
    except InvalidGossipMsg:
        return (True, False)
    short_channel_id = ShortChannelID(payload['short_channel_id'])
    if (r == UpdateStatus.GOOD):
        self.logger.info(f'applied channel update to {short_channel_id}')
        for chan in self.channels.values():
            if (chan.short_channel_id == short_channel_id):
                chan.set_remote_update(payload)
        update = True
    elif (r == UpdateStatus.ORPHANED):
        self.logger.info(f'Could not find {short_channel_id}. maybe update is for private channel?')
        start_node_id = route[sender_idx].node_id
        update = self.channel_db.add_channel_update_for_private_channel(payload, start_node_id)
        blacklist = (not update)
    elif (r == UpdateStatus.EXPIRED):
        blacklist = True
    elif (r == UpdateStatus.DEPRECATED):
        self.logger.info(f'channel update is not more recent.')
        blacklist = True
    elif (r == UpdateStatus.UNCHANGED):
        blacklist = True
    return (blacklist, update)
def _handle_chanupd_from_failed_htlc(self, payload, *, route, sender_idx) -> Tuple[(bool, bool)]:
    blacklist = False
    update = False
    try:
        r = self.channel_db.add_channel_update(payload, verify=True)
    except InvalidGossipMsg:
        return (True, False)
    short_channel_id = ShortChannelID(payload['short_channel_id'])
    if (r == UpdateStatus.GOOD):
        self.logger.info(f'applied channel update to {short_channel_id}')
        for chan in self.channels.values():
            if (chan.short_channel_id == short_channel_id):
                chan.set_remote_update(payload)
        update = True
    elif (r == UpdateStatus.ORPHANED):
        self.logger.info(f'Could not find {short_channel_id}. maybe update is for private channel?')
        start_node_id = route[sender_idx].node_id
        update = self.channel_db.add_channel_update_for_private_channel(payload, start_node_id)
        blacklist = (not update)
    elif (r == UpdateStatus.EXPIRED):
        blacklist = True
    elif (r == UpdateStatus.DEPRECATED):
        self.logger.info(f'channel update is not more recent.')
        blacklist = True
    elif (r == UpdateStatus.UNCHANGED):
        blacklist = True
    return (blacklist, update)