Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
shyba committed Mar 18, 2021
1 parent ff5d5f2 commit 2c97f60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lbry/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async def stop(self):

class CommandTestCase(IntegrationTestCase):

VERBOSITY = logging.WARN
VERBOSITY = logging.INFO
blob_lru_cache_size = 0

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -449,7 +449,9 @@ def get_all_addresses(tx):
async def generate(self, blocks):
""" Ask lbrycrd to generate some blocks and wait until ledger has them. """
await self.blockchain.generate(blocks)
logging.warning("waiting height %s", self.blockchain.block_expected)
await self.ledger.on_header.where(self.blockchain.is_expected_block)
logging.warning("got header %s", self.blockchain.block_expected)

async def blockchain_claim_name(self, name: str, value: str, amount: str, confirm=True):
txid = await self.blockchain._cli_cmnd('claimname', name, value, amount)
Expand Down
1 change: 1 addition & 0 deletions lbry/wallet/ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ async def wait(self, tx: Transaction, height=-1, timeout=1):
addresses.add(self.hash160_to_address(txo.pubkey_hash))
start = int(time.perf_counter())
while timeout and (int(time.perf_counter()) - start) <= timeout:
log.warning('wait %s %s %s %s', tx, height, addresses, timeout)
if await self._wait_round(tx, height, addresses):
return
raise asyncio.TimeoutError('Timed out waiting for transaction.')
Expand Down

0 comments on commit 2c97f60

Please sign in to comment.