From a735a3f0c1311af09e033fc172af442426fef5fd Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 1 Nov 2018 14:34:26 -0400 Subject: [PATCH] Accumulate touched over several blocks So if several blocks are processed together, the touched addresses is their union not just the most recent Fixes #630 --- electrumx/server/controller.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/electrumx/server/controller.py b/electrumx/server/controller.py index ecbf5b8..6b82e90 100644 --- a/electrumx/server/controller.py +++ b/electrumx/server/controller.py @@ -48,11 +48,10 @@ class Notifications(object): # new block height return touched = tmp.pop(height) - touched.update(tbp.pop(height, set())) for old in [h for h in tmp if h <= height]: del tmp[old] for old in [h for h in tbp if h <= height]: - del tbp[old] + touched.update(tbp.pop(old)) await self.notify(height, touched) async def notify(self, height, touched):