Skip to content

Commit

Permalink
Handle cases where a TX is not received yet in wait_for_instantlock
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Mar 18, 2019
1 parent 7fd1e90 commit 3a88dc7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions qa/rpc-tests/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,14 @@ def wait_for_instantlock(self, txid, node):
start = time()
locked = False
while True:
is_tx = node.getrawtransaction(txid, True)
if is_tx['instantlock']:
locked = True
break
try:
is_tx = node.getrawtransaction(txid, True)
if is_tx['instantlock']:
locked = True
break
except:
# TX not received yet?
pass
if time() > start + 10:
break
sleep(0.5)
Expand Down

0 comments on commit 3a88dc7

Please sign in to comment.