示例#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)
示例#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))
示例#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))
示例#5
0
def testAllBroadcast(pool):
    pool.looper.run(msgAll(pool.nodeset))
def testAllBroadcast(pool):
    pool.looper.run(msgAll(pool.nodeset))