Instantiate resolver before the request to hold the selected height

This commit is contained in:
Victor Shyba 2018-12-14 16:29:46 -03:00 committed by Lex Berezhny
parent 69b60c19c3
commit 3b9d6c4f8e

View file

@ -65,8 +65,9 @@ class MainNetLedger(BaseLedger):
except Exception as e: except Exception as e:
return {'error': str(e)} return {'error': str(e)}
try: try:
resolver = self.resolver
resolutions = await self.network.get_values_for_uris(self.headers.hash().decode(), *uris) resolutions = await self.network.get_values_for_uris(self.headers.hash().decode(), *uris)
return await self.resolver._handle_resolutions(resolutions, uris, page, page_size) return await resolver._handle_resolutions(resolutions, uris, page, page_size)
except Exception as e: except Exception as e:
return {'error': str(e)} return {'error': str(e)}