def wait_for_chainlock(self, node, block_hash):
    t = time()
    while ((time() - t) < 15):
        try:
            block = node.getblockheader(block_hash)
            if ((block['confirmations'] > 0) and block['chainlock']):
                return
        except:
            pass
        sleep(0.1)
    raise AssertionError('wait_for_chainlock timed out')
def wait_for_chainlock(self, node, block_hash):
    t = time()
    while ((time() - t) < 15):
        try:
            block = node.getblockheader(block_hash)
            if ((block['confirmations'] > 0) and block['chainlock']):
                return
        except:
            pass
        sleep(0.1)
    raise AssertionError('wait_for_chainlock timed out')