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
This commit is contained in:
Neil Booth 2018-11-01 14:34:26 -04:00
parent 214fc83648
commit a735a3f0c1

View File

@ -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):