From 45a255e7a22920d2abbad59402010d6230052192 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Tue, 6 Sep 2022 17:16:23 -0500 Subject: [PATCH] Reuse generate() logic to wait on hub instead of half-baked reorg() logic. --- tests/integration/takeovers/test_resolve_command.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/integration/takeovers/test_resolve_command.py b/tests/integration/takeovers/test_resolve_command.py index 601fa87c4..9661e2fe6 100644 --- a/tests/integration/takeovers/test_resolve_command.py +++ b/tests/integration/takeovers/test_resolve_command.py @@ -1555,18 +1555,10 @@ class ResolveAfterReorg(BaseResolveTestCase): blocks = self.ledger.headers.height - start self.blockchain.block_expected = start - 1 - - prepare = self.ledger.on_header.where(self.blockchain.is_expected_block) - self.conductor.spv_node.server.synchronized.clear() - # go back to start await self.blockchain.invalidate_block((await self.ledger.headers.hash(start)).decode()) # go to previous + 1 - await self.blockchain.generate(blocks + 2) - - await prepare # no guarantee that it didn't happen already, so start waiting from before calling generate - await self.conductor.spv_node.server.synchronized.wait() - # await asyncio.wait_for(self.on_header(self.blockchain.block_expected), 30.0) + await self.generate(blocks + 2) async def assertBlockHash(self, height): reader_db = self.conductor.spv_node.server.db