From 50d6cadef01210986e51897aca60cbab018c0706 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Mon, 27 May 2019 20:19:53 +0400 Subject: [PATCH] connector --- pybtc/connector/connector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybtc/connector/connector.py b/pybtc/connector/connector.py index 7e2d9ce..659f909 100644 --- a/pybtc/connector/connector.py +++ b/pybtc/connector/connector.py @@ -406,8 +406,8 @@ class Connector: self.tx_cache.pop(h) tx_rate = round(self.total_received_tx / (time.time() - self.start_time), 4) - t = time.time() - self.start_time - if t % 20 == 0: + t = 10000 if not self.deep_synchronization else 10000 + if (self.total_received_tx - self.total_received_tx_stat) > t: self.total_received_tx_stat = self.total_received_tx self.log.warning("Blocks %s; tx rate: %s;" % (block["height"], tx_rate)) if self.utxo_data: