We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8aea2c1 + 3532aff commit c2ab981Copy full SHA for c2ab981
pyinjective/async_client.py
@@ -173,8 +173,12 @@ async def close_chain_channel(self):
173
self.cron.stop()
174
175
async def sync_timeout_height(self):
176
- block = await self.get_latest_block()
177
- self.timeout_height = block.block.header.height + DEFAULT_TIMEOUTHEIGHT
+ try:
+ block = await self.get_latest_block()
178
+ self.timeout_height = block.block.header.height + DEFAULT_TIMEOUTHEIGHT
179
+ except Exception as e:
180
+ logging.debug("error while fetching latest block, setting timeout height to 0:{}".format(e))
181
+ self.timeout_height = 0
182
183
# cookie helper methods
184
async def fetch_cookie(self, type):
0 commit comments