示例#1
0
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
示例#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)