various fixes
[electrum-server.git] / backends / bitcoind / blockchain_processor.py
index 310f10b..219ffdc 100644 (file)
@@ -340,7 +340,7 @@ class BlockchainProcessor(Processor):
         for i in range(l-1, -1, -1):
             item = serialized_hist[80*i:80*(i+1)]
             item_height = int(rev_hex(item[36:39].encode('hex')), 16)
-            if item_height < tx_height:
+            if item_height <= tx_height:
                 serialized_hist = serialized_hist[0:80*(i+1)] + s + serialized_hist[80*(i+1):]
                 break
         else:
@@ -894,6 +894,7 @@ class BlockchainProcessor(Processor):
                 self.history_cache.pop(address)
 
         if address in self.watched_addresses:
+            # TODO: update cache here. if new value equals cached value, do not send notification
             self.address_queue.put(address)
 
     def main_iteration(self):