URI: 
       tfix: wallet.is_used - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 714445aba88a435f2c71b09c042c48e71610fc36
   DIR parent 0201bdbb202313599d806cdbb564a36edd8a4cbb
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Thu,  6 Aug 2015 19:19:25 +0200
       
       fix: wallet.is_used
       
       Diffstat:
         M gui/qt/main_window.py               |       3 ++-
         M lib/wallet.py                       |       5 ++---
       
       2 files changed, 4 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -1703,7 +1703,8 @@ class ElectrumWindow(QMainWindow):
                        used_flag = False
                        addr_list = account.get_addresses(is_change)
                        for address in addr_list:
       -                    num, is_used = self.wallet.is_used(address)
       +                    num = len(self.wallet.history.get(address,[]))
       +                    is_used = self.wallet.is_used(address)
                            label = self.wallet.labels.get(address,'')
                            c, u, x = self.wallet.get_addr_balance(address)
                            balance = self.format_amount(c + u + x)
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -1128,7 +1128,7 @@ class Abstract_Wallet(object):
            def is_used(self, address):
                h = self.history.get(address,[])
                c, u, x = self.get_addr_balance(address)
       -        return len(h), len(h) > 0 and c + u + x == 0
       +        return len(h) > 0 and c + u + x == 0
        
            def is_empty(self, address):
                c, u, x = self.get_addr_balance(address)
       t@@ -1346,8 +1346,7 @@ class Imported_Wallet(Abstract_Wallet):
                self.accounts[IMPORTED_ACCOUNT].get_private_key((0,0), self, password)
        
            def is_used(self, address):
       -        h = self.history.get(address,[])
       -        return len(h), False
       +        return False
        
            def get_master_public_keys(self):
                return {}