From: ThomasV Date: Sat, 6 Apr 2013 13:35:47 +0000 (+0400) Subject: Merge branch 'master' of github.com:spesmilo/electrum-server X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=dd25a1f7c56c3964fb3f760e99b5b69b96ab7c75;hp=a71f02d33aceec0b70bb365c7d89663a55c47f0a Merge branch 'master' of github.com:spesmilo/electrum-server --- diff --git a/backends/bitcoind/blockchain_processor.py b/backends/bitcoind/blockchain_processor.py index 5d83be4..e93439e 100644 --- a/backends/bitcoind/blockchain_processor.py +++ b/backends/bitcoind/blockchain_processor.py @@ -852,8 +852,11 @@ class BlockchainProcessor(Processor): new_mempool_hist[addr] = h # invalidate cache for mempool addresses whose mempool history has changed - for addr in new_mempool_hist.keys(): - if addr in self.mempool_hist.keys(): + new_mempool_hist_keys = new_mempool_hist.keys() + self_mempool_hist_keys = self.mempool_hist.keys() + + 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: @@ -861,8 +864,8 @@ class BlockchainProcessor(Processor): # invalidate cache for addresses that are removed from mempool ? # this should not be necessary if they go into a block, but they might not - for addr in self.mempool_hist.keys(): - if addr not in new_mempool_hist.keys(): + for addr in self_mempool_hist_keys: + if addr not in new_mempool_hist_keys: self.invalidate_cache(addr)