URI: 
       tlnchannel.available_to_spend: return zero if frozen or not active. Without this, the channel details window displays can_send/can_receive values that are inconsistent with the main window - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit d70431c0e7f1eeb028099f6a40706b6ed39c9966
   DIR parent b29cdc02da10836fc32e6be76b6ca5f463bd86ac
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Wed, 30 Dec 2020 11:51:02 +0100
       
       lnchannel.available_to_spend: return zero if frozen or not active. Without this, the channel details window displays can_send/can_receive values that are inconsistent with the main window
       
       Diffstat:
         M electrum/lnchannel.py               |       4 +++-
         M electrum/lnworker.py                |       6 ++----
       
       2 files changed, 5 insertions(+), 5 deletions(-)
       ---
   DIR diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py
       t@@ -1095,6 +1095,9 @@ class Channel(AbstractChannel):
                sender = subject
                receiver = subject.inverted()
                initiator = LOCAL if self.constraints.is_initiator else REMOTE  # the initiator/funder pays on-chain fees
       +        is_frozen = self.is_frozen_for_sending() if subject == LOCAL else self.is_frozen_for_receiving()
       +        if not self.is_active() or is_frozen:
       +            return 0
        
                def consider_ctx(*, ctx_owner: HTLCOwner, is_htlc_dust: bool) -> int:
                    ctn = self.get_next_ctn(ctx_owner)
       t@@ -1488,4 +1491,3 @@ class Channel(AbstractChannel):
                    self.logger.info('funding outpoint mismatch')
                    return False
                return True
       -
   DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py
       t@@ -1419,8 +1419,7 @@ class LNWallet(LNWorker):
                with self.lock:
                    if self.channels:
                        for c in self.channels.values():
       -                    if c.is_active() and not c.is_frozen_for_sending():
       -                        send_values.append(Decimal(c.available_to_spend(LOCAL)) / 1000)
       +                    send_values.append(Decimal(c.available_to_spend(LOCAL)) / 1000)
                return max(send_values)
        
            def num_sats_can_receive(self) -> Decimal:
       t@@ -1428,8 +1427,7 @@ class LNWallet(LNWorker):
                with self.lock:
                    if self.channels:
                        for c in self.channels.values():
       -                    if c.is_active() and not c.is_frozen_for_receiving():
       -                        receive_values.append(Decimal(c.available_to_spend(REMOTE)) / 1000)
       +                    receive_values.append(Decimal(c.available_to_spend(REMOTE)) / 1000)
                return max(receive_values)
        
            def can_pay_invoice(self, invoice: LNInvoice) -> bool: