non blocking mempool loop

This commit is contained in:
Jack Robison 2021-07-27 16:12:07 -04:00
parent f0a195a6d4
commit f7622f24b2
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -663,7 +663,9 @@ class SessionManager:
for hashX in touched.intersection(self.mempool_statuses.keys()):
self.mempool_statuses.pop(hashX, None)
touched.intersection_update(self.hashx_subscriptions_by_session.keys())
await asyncio.get_event_loop().run_in_executor(
None, touched.intersection_update, self.hashx_subscriptions_by_session.keys()
)
if touched or (height_changed and self.mempool_statuses):
notified_hashxs = 0