def can_receive(self, amount_msat: int, *, check_frozen=False,
                    ignore_min_htlc_value: bool = False) -> bool:
        """Returns whether the remote can add an HTLC of given value."""
        if check_frozen and self.is_frozen_for_receiving():
            return False
        try:
            self._assert_can_add_htlc(
                htlc_proposer=REMOTE,
                amount_msat=amount_msat,
                ignore_min_htlc_value=ignore_min_htlc_value)
        except PaymentFailure:
            return False
        return True
Returns whether the remote can add an HTLC of given value.
electrum/lnchannel.py