Exemplo n.º 1
0
def testKeyShareParty(looper, txnPoolNodeSet, tdir_for_func, tconf_for_func):
    """
    connections to all nodes should be successfully established when key
    sharing is enabled.
    """

    logger.debug("-----sharing keys-----")
    looper.run(checkNodesConnected(txnPoolNodeSet))

    logger.debug("-----key sharing done, connect after key sharing-----")
    looper.run(checkNodesConnected(txnPoolNodeSet), msgAll(txnPoolNodeSet))
def testKeyShareParty(looper, txnPoolNodeSet, tdir_for_func, tconf_for_func):
    """
    connections to all nodes should be successfully established when key
    sharing is enabled.
    """

    logger.debug("-----sharing keys-----")
    looper.run(checkNodesConnected(txnPoolNodeSet))

    logger.debug("-----key sharing done, connect after key sharing-----")
    looper.run(checkNodesConnected(txnPoolNodeSet),
               msgAll(txnPoolNodeSet))
    for node in txnPoolNodeSet:
        node.stop()
        looper.removeProdable(node)
Exemplo n.º 3
0
def testKeyShareParty(tdir_for_func):
    """
    connections to all nodes should be successfully established when key
    sharing is enabled.
    """
    nodeReg = genNodeReg(5)

    logger.debug("-----sharing keys-----")
    with TestNodeSet(nodeReg=nodeReg, tmpdir=tdir_for_func) as nodeSet:
        with Looper(nodeSet) as looper:
            looper.run(checkNodesConnected(nodeSet))

    logger.debug("-----key sharing done, connect after key sharing-----")
    with TestNodeSet(nodeReg=nodeReg, tmpdir=tdir_for_func) as nodeSet:
        with Looper(nodeSet) as loop:
            loop.run(checkNodesConnected(nodeSet), msgAll(nodeSet))
Exemplo n.º 4
0
def testKeyShareParty(tdir_for_func):
    """
    connections to all nodes should be successfully established when key
    sharing is enabled.
    """
    nodeReg = genNodeReg(5)

    logger.debug("-----sharing keys-----")
    with TestNodeSet(nodeReg=nodeReg, tmpdir=tdir_for_func) as nodeSet:
        with Looper(nodeSet) as looper:
            for n in nodeSet:
                n.startKeySharing()
            looper.run(checkNodesConnected(nodeSet))

    logger.debug("-----key sharing done, connect after key sharing-----")
    with TestNodeSet(nodeReg=nodeReg, tmpdir=tdir_for_func) as nodeSet:
        with Looper(nodeSet) as loop:
            loop.run(checkNodesConnected(nodeSet), msgAll(nodeSet))
Exemplo n.º 5
0
def testAllBroadcast(pool):
    pool.looper.run(msgAll(pool.nodeset))
Exemplo n.º 6
0
def testAllBroadcast(pool):
    pool.looper.run(msgAll(pool.nodeset))