From 982f2c96345abcf674da6509834899405f82beeb Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 20 Nov 2020 10:57:28 -0500 Subject: [PATCH] fix test --- .../blockchain/test_blockchain_reorganization.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/integration/blockchain/test_blockchain_reorganization.py b/tests/integration/blockchain/test_blockchain_reorganization.py index 9ae915062..5ae8786be 100644 --- a/tests/integration/blockchain/test_blockchain_reorganization.py +++ b/tests/integration/blockchain/test_blockchain_reorganization.py @@ -99,17 +99,18 @@ class BlockchainReorganizationTests(CommandTestCase): await self.blockchain.clear_mempool() await self.blockchain.generate(2) + # wait for the client to catch up and verify the reorg + await asyncio.wait_for(self.on_header(209), 3.0) + await self.assertBlockHash(207) + await self.assertBlockHash(208) + await self.assertBlockHash(209) + # verify the claim was dropped from block 208 as returned by lbrycrdd reorg_block_hash = await self.blockchain.get_block_hash(208) self.assertNotEqual(invalidated_block_hash, reorg_block_hash) block_207 = await self.blockchain.get_block(reorg_block_hash) self.assertNotIn(txo.tx_ref.id, block_207['tx']) - # wait for the client to catch up and verify the reorg - await asyncio.wait_for(self.on_header(209), 3.0) - await self.assertBlockHash(207) - await self.assertBlockHash(208) - await self.assertBlockHash(209) client_reorg_block_hash = (await self.ledger.headers.hash(208)).decode() self.assertEqual(client_reorg_block_hash, reorg_block_hash)