|
@ -75,13 +75,16 @@ class BlockCache(object): |
|
|
.format(self.cache_limit)) |
|
|
.format(self.cache_limit)) |
|
|
|
|
|
|
|
|
last_log = 0 |
|
|
last_log = 0 |
|
|
|
|
|
prior_height = self.db.height |
|
|
while await self.maybe_prefill(): |
|
|
while await self.maybe_prefill(): |
|
|
now = time.time() |
|
|
now = time.time() |
|
|
if now > last_log + 15: |
|
|
count = self.fetched_height - prior_height |
|
|
|
|
|
if now > last_log + 15 and count: |
|
|
last_log = now |
|
|
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}' |
|
|
'daemon height: {:,d}' |
|
|
.format(self.fetched_height, |
|
|
.format(count, self.fetched_height, |
|
|
self.daemon_height)) |
|
|
self.daemon_height)) |
|
|
await asyncio.sleep(1) |
|
|
await asyncio.sleep(1) |
|
|
|
|
|
|
|
|