def has_anchor_channels(self) -> bool:
        """Returns True if any active channel is an anchor channel."""
        return any(chan.has_anchors() and not chan.is_redeemed()
                   for chan in self.channels.values())
Returns True if any active channel is an anchor channel.
electrum/lnworker.py