diff --git a/server/server.py b/server/server.py index 75b89f4..e58f457 100644 --- a/server/server.py +++ b/server/server.py @@ -75,13 +75,16 @@ class BlockCache(object): .format(self.cache_limit)) last_log = 0 + prior_height = self.db.height while await self.maybe_prefill(): now = time.time() - if now > last_log + 15: + count = self.fetched_height - prior_height + if now > last_log + 15 and count: last_log = now - self.logger.info('prefilled blocks to height {:,d} ' + prior_height = self.fetched_height + self.logger.info('prefilled {:,d} blocks to height {:,d} ' 'daemon height: {:,d}' - .format(self.fetched_height, + .format(count, self.fetched_height, self.daemon_height)) await asyncio.sleep(1)