Merge pull request #2699 from lbryio/faster-account-startup

don't log account details on startup if there are more than 10
This commit is contained in:
Jack Robison 2019-12-30 16:26:36 -05:00 committed by GitHub
commit d9b482d90a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,7 +107,10 @@ class MainNetLedger(BaseLedger):
await super().start()
await asyncio.gather(*(a.maybe_migrate_certificates() for a in self.accounts))
await asyncio.gather(*(a.save_max_gap() for a in self.accounts))
await self._report_state()
if len(self.accounts) > 10:
log.info("Loaded %i accounts", len(self.accounts))
else:
await self._report_state()
self.on_transaction.listen(self._reset_balance_cache)
async def _report_state(self):