start waiting before generate

This commit is contained in:
Victor Shyba 2021-03-18 02:46:23 -03:00 committed by Victor Shyba
parent 27cc61d45e
commit 8da04a584f

View file

@ -448,8 +448,9 @@ class CommandTestCase(IntegrationTestCase):
async def generate(self, blocks): async def generate(self, blocks):
""" Ask lbrycrd to generate some blocks and wait until ledger has them. """ """ Ask lbrycrd to generate some blocks and wait until ledger has them. """
prepare = self.ledger.on_header.where(self.blockchain.is_expected_block)
await self.blockchain.generate(blocks) await self.blockchain.generate(blocks)
await self.ledger.on_header.where(self.blockchain.is_expected_block) await prepare # no guarantee that it didn't happen already, so start waiting from before calling generate
async def blockchain_claim_name(self, name: str, value: str, amount: str, confirm=True): async def blockchain_claim_name(self, name: str, value: str, amount: str, confirm=True):
txid = await self.blockchain._cli_cmnd('claimname', name, value, amount) txid = await self.blockchain._cli_cmnd('claimname', name, value, amount)