From: ThomasV Date: Thu, 15 Nov 2012 11:34:48 +0000 (+0400) Subject: fix memory pool and cache X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=07156c141d55669a64bf2ab4f8627ba5edc866b7 fix memory pool and cache --- diff --git a/backends/bitcoind/blockchain_processor.py b/backends/bitcoind/blockchain_processor.py index 2bea34d..ae3d590 100644 --- a/backends/bitcoind/blockchain_processor.py +++ b/backends/bitcoind/blockchain_processor.py @@ -677,8 +677,11 @@ class BlockchainProcessor(Processor): h.append( tx_hash ) new_mempool_hist[addr] = h - for addr in self.mempool_hist.keys(): - if self.mempool_hist[addr] != new_mempool_hist[addr]: + for addr in new_mempool_hist.keys(): + if addr in self.mempool_hist.keys(): + if self.mempool_hist[addr] != new_mempool_hist[addr]: + self.invalidate_cache(addr) + else: self.invalidate_cache(addr) with self.mempool_lock: @@ -692,7 +695,8 @@ class BlockchainProcessor(Processor): print_log( "cache: invalidating", address ) self.history_cache.pop(address) - self.address_queue.put(address) + if address in self.watched_addresses: + self.address_queue.put(address)