forked from LBRYCommunity/lbry-sdk
listen for on_read.first before it is triggered
This commit is contained in:
parent
a8f11eb3c3
commit
ca31363180
1 changed files with 2 additions and 1 deletions
|
@ -317,6 +317,7 @@ class Ledger(metaclass=LedgerRegistry):
|
||||||
self.headers.open()
|
self.headers.open()
|
||||||
])
|
])
|
||||||
first_connection = self.network.on_connected.first
|
first_connection = self.network.on_connected.first
|
||||||
|
first_ready = self.on_ready.first
|
||||||
asyncio.ensure_future(self.network.start())
|
asyncio.ensure_future(self.network.start())
|
||||||
await first_connection
|
await first_connection
|
||||||
async with self._header_processing_lock:
|
async with self._header_processing_lock:
|
||||||
|
@ -328,7 +329,7 @@ class Ledger(metaclass=LedgerRegistry):
|
||||||
else:
|
else:
|
||||||
await self._report_state()
|
await self._report_state()
|
||||||
self.on_transaction.listen(self._reset_balance_cache)
|
self.on_transaction.listen(self._reset_balance_cache)
|
||||||
await self.on_ready.first
|
await first_ready
|
||||||
|
|
||||||
async def join_network(self, *_):
|
async def join_network(self, *_):
|
||||||
log.info("Subscribing and updating accounts.")
|
log.info("Subscribing and updating accounts.")
|
||||||
|
|
Loading…
Add table
Reference in a new issue