From: ThomasV Date: Sat, 24 Nov 2012 20:30:18 +0000 (+0400) Subject: fix: cache was using a wrong format X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=99c1e9407bda694782f79ccbd72d6b0336b91d0a fix: cache was using a wrong format --- diff --git a/backends/abe/__init__.py b/backends/abe/__init__.py index 8e143aa..cade991 100644 --- a/backends/abe/__init__.py +++ b/backends/abe/__init__.py @@ -394,18 +394,19 @@ class AbeStore(Datastore_class): txpoint.pop('tx_id') + + txpoints = map(lambda x: {'tx_hash':x['tx_hash'], 'height':x['height']}, txpoints) + out = [] + for item in txpoints: + if item not in out: out.append(item) + # cache result - # do not cache mempool results because statuses are ambiguous - if not address_has_mempool: - with self.cache_lock: - self.tx_cache[addr] = txpoints + ## do not cache mempool results because statuses are ambiguous + #if not address_has_mempool: + with self.cache_lock: + self.tx_cache[addr] = out - - out = map(lambda x: {'tx_hash':x['tx_hash'], 'height':x['height']}, txpoints) - out2 = [] - for item in out: - if item not in out2: out2.append(item) - return out2 + return out def get_status(self, addr, cache_only=False):