async def runBootstrap(bootstrapFunc):
    try:
        await bootstrapFunc()
    except TimeoutError as exc:
        raise NoConsensusYet("consensus is not yet achieved, "
                             "check if sovrin is running and "
                             "client is able to connect to it") from exc
Beispiel #2
0
def _ensureReqCompleted(reqKey, client, clbk):
    reply, err = get_reply_if_confirmed(client, *reqKey)
    if err:
        raise OperationError(err)

    if reply is None:
        raise NoConsensusYet('not completed')

    return clbk(reply, err)
def _ensureReqCompleted(reqKey, client, clbk):
    reply, err = client.replyIfConsensus(*reqKey)

    if err:
        raise OperationError(err)

    if reply is None:
        raise NoConsensusYet('not completed')

    return clbk(reply, err)