From cd1ce32377a4619bed5ecb6e4cbd4e60f5694136 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 27 Jul 2021 16:12:07 -0400 Subject: [PATCH] non blocking mempool loop --- lbry/wallet/server/session.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/server/session.py b/lbry/wallet/server/session.py index cc78dd1ef..fde6c8c6d 100644 --- a/lbry/wallet/server/session.py +++ b/lbry/wallet/server/session.py @@ -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