From 7194da6a0c7742236c4928e2e0c52834fb476e8d Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 2 Sep 2022 15:07:13 -0500 Subject: [PATCH] Wait for _es_height in addition to db_height. --- lbry/testcase.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lbry/testcase.py b/lbry/testcase.py index 6526845cd..8b08aee77 100644 --- a/lbry/testcase.py +++ b/lbry/testcase.py @@ -308,8 +308,11 @@ class IntegrationTestCase(AsyncioTestCase): while True: await self.conductor.spv_node.server.synchronized.wait() self.conductor.spv_node.server.synchronized.clear() - if self.conductor.spv_node.server.db.db_height >= height: - break + if (self.conductor.spv_node.server.db.db_height < height): + continue + if (self.conductor.spv_node.server._es_height < height): + continue + break def on_address_update(self, address): return self.ledger.on_transaction.where( @@ -331,8 +334,11 @@ class IntegrationTestCase(AsyncioTestCase): while True: await self.conductor.spv_node.server.synchronized.wait() self.conductor.spv_node.server.synchronized.clear() - if self.conductor.spv_node.server.db.db_height >= height: - break + if (self.conductor.spv_node.server.db.db_height < height): + continue + if (self.conductor.spv_node.server._es_height < height): + continue + break class FakeExchangeRateManager(ExchangeRateManager):