Wait for _es_height in addition to db_height.

This commit is contained in:
Jonathan Moody 2022-09-02 15:07:13 -05:00 committed by Lex Berezhny
parent f7455600cc
commit 38e9b5b432

View file

@ -308,8 +308,11 @@ class IntegrationTestCase(AsyncioTestCase):
while True: while True:
await self.conductor.spv_node.server.synchronized.wait() await self.conductor.spv_node.server.synchronized.wait()
self.conductor.spv_node.server.synchronized.clear() self.conductor.spv_node.server.synchronized.clear()
if self.conductor.spv_node.server.db.db_height >= height: if (self.conductor.spv_node.server.db.db_height < height):
break continue
if (self.conductor.spv_node.server._es_height < height):
continue
break
def on_address_update(self, address): def on_address_update(self, address):
return self.ledger.on_transaction.where( return self.ledger.on_transaction.where(
@ -331,8 +334,11 @@ class IntegrationTestCase(AsyncioTestCase):
while True: while True:
await self.conductor.spv_node.server.synchronized.wait() await self.conductor.spv_node.server.synchronized.wait()
self.conductor.spv_node.server.synchronized.clear() self.conductor.spv_node.server.synchronized.clear()
if self.conductor.spv_node.server.db.db_height >= height: if (self.conductor.spv_node.server.db.db_height < height):
break continue
if (self.conductor.spv_node.server._es_height < height):
continue
break
class FakeExchangeRateManager(ExchangeRateManager): class FakeExchangeRateManager(ExchangeRateManager):