From b6e911879775a3d06edce6f35a9f9b7a513812d1 Mon Sep 17 00:00:00 2001 From: Gerlof van Ek Date: Mon, 28 Jul 2025 21:43:25 +0200 Subject: [PATCH] ZMQ remove time.sleep(0.1) (#341) --- basicswap/basicswap.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index 7090a6d..d14df20 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -10528,15 +10528,19 @@ class BasicSwap(BaseApp, UIApp): if Coins.PART not in self.coin_clients: return + self.thread_pool.submit(self._processZmqHashwtxAsync) + + except Exception as e: + self.log.warning(f"Error processing PART wallet transaction: {e}") + if self.debug: + self.log.error(traceback.format_exc()) + + def _processZmqHashwtxAsync(self) -> None: + try: ci = self.ci(Coins.PART) cc = self.coin_clients[Coins.PART] - current_height = cc.get("chain_height", 0) - import time - - time.sleep(0.1) - checkAndNotifyBalanceChange(self, Coins.PART, ci, cc, current_height, "zmq") except Exception as e: