detect gaps for change too
authorecdsa <ecdsa@github>
Sat, 16 Mar 2013 17:24:45 +0000 (18:24 +0100)
committerecdsa <ecdsa@github>
Sat, 16 Mar 2013 17:24:45 +0000 (18:24 +0100)
gui/gui_classic.py

index 0b28f4e..8037d92 100644 (file)
@@ -1094,13 +1094,12 @@ class ElectrumWindow(QMainWindow):
                 for address in account[is_change]:
                     h = self.wallet.history.get(address,[])
             
-                    if not is_change:
-                        if h == []:
-                            gap += 1
-                            if gap > self.wallet.gap_limit:
-                                is_red = True
-                        else:
-                            gap = 0
+                    if h == []:
+                        gap += 1
+                        if gap > self.wallet.gap_limit:
+                            is_red = True
+                    else:
+                        gap = 0
 
                     num_tx = '*' if h == ['*'] else "%d"%len(h)
                     item = QTreeWidgetItem( [ address, '', '', num_tx] )