From c26bc43a008bbf3e2535ed472bd81bfd47af0c70 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 6 Nov 2016 08:54:56 +0900 Subject: [PATCH] Remove keys if value is empty --- server/block_processor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/block_processor.py b/server/block_processor.py index 4ea5d55..94a4cf3 100644 --- a/server/block_processor.py +++ b/server/block_processor.py @@ -190,6 +190,8 @@ class MemPool(LoggedClass): hash168s.update(hash168 for hash168, value in txout_pairs) for hash168 in hash168s: self.hash168s[hash168].remove(hex_hash) + if not self.hash168s[hash168]: + del self.hash168s[hash168] touched.update(hash168s) # Get the raw transactions for the new hashes. Ignore the