Exemplo n.º 1
0
def setup(txnPoolNodeSet):
    A, B, C, D = txnPoolNodeSet  # type: TestNode
    delay(Propagate, frm=[B, C, D], to=A, howlong=howlong)
    # Delay MessageRep by long simulating loss as if Propagate is missing, it
    # is requested
    A.nodeIbStasher.delay(msg_rep_delay(10 * howlong, [
        PROPAGATE,
    ]))
def case_6_setup(txnPoolNodeSet):
    A, B, C, D = txnPoolNodeSet

    # A will get Nomination, Primary, Reelection from after elections get over
    for m in (Nomination, Primary, Reelection):
        delay(m, frm=B, to=A, howlong=120)

    # A will get Primary earlier than Nominates
    delay(Nomination, frm=(C, D), to=A, howlong=10)
def case_6_setup(txnPoolNodeSet):
    A, B, C, D = txnPoolNodeSet

    # A will get Nomination, Primary, Reelection from after elections get over
    for m in (Nomination, Primary, Reelection):
        delay(m, frm=B, to=A, howlong=120)

    # A will get Primary earlier than Nominates
    delay(Nomination, frm=(C, D), to=A, howlong=10)
def case_6_setup(startedNodes):
    A, B, C, D = startedNodes.nodes.values()

    # A will get Nomination, Primary, Reelection from after elections get over
    for m in (Nomination, Primary, Reelection):
        delay(m, frm=B, to=A, howlong=120)

    # A will get Primary earlier than Nominates
    delay(Nomination, frm=(C, D), to=A, howlong=10)
Exemplo n.º 5
0
def setup(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client):
    global initial_ledger_size
    A, B, C, D = txnPoolNodeSet  # type: TestNode
    lagged_node = C
    frm = [A, B, D]
    delay(Commit, frm=frm, to=lagged_node, howlong=howlong)
    initial_ledger_size = lagged_node.domainLedger.size
    request_couple_json = sdk_send_random_requests(looper, sdk_pool_handle,
                                                   sdk_wallet_client, 1)
    return request_couple_json
def setup(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client):
    global initial_ledger_size
    A, B, C, D = txnPoolNodeSet  # type: TestNode
    lagged_node = A
    frm = [B, C, D]
    delay(Commit, frm=frm, to=lagged_node, howlong=howlong)
    initial_ledger_size = lagged_node.domainLedger.size
    request_couple_json = sdk_send_random_requests(
        looper, sdk_pool_handle, sdk_wallet_client, 1)
    return request_couple_json
def setup(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client):
    global initial_ledger_size
    A, B, C, D = txnPoolNodeSet  # type: TestNode
    lagged_node = A
    frm = [B, C, D]
    delay(Propagate, frm=frm, to=lagged_node, howlong=howlong)
    # Delay MessageRep by long simulating loss as if Propagate is missing, it
    # is requested
    A.nodeIbStasher.delay(msg_rep_delay(10 * howlong, [PROPAGATE, ]))
    initial_ledger_size = lagged_node.domainLedger.size
    request_couple_json = sdk_send_random_requests(
        looper, sdk_pool_handle, sdk_wallet_client, 1)
    return request_couple_json
def setup(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client,):
    def _clean(*args):
        pass

    A, B, C, D = txnPoolNodeSet  # type: TestNode
    delay(Propagate, frm=[B, C, D], to=A, howlong=howlong)
    # Delay MessageRep by long simulating loss as if Propagate is missing, it
    # is requested
    A.nodeIbStasher.delay(msg_rep_delay(10 * howlong, [PROPAGATE, ]))
    # disable _clean method which remove req.key from requests map
    A.requests._clean = types.MethodType(
                            _clean, A.requests)
    request_couple_json = sdk_send_random_requests(
        looper, sdk_pool_handle, sdk_wallet_client, reqCount)
    return request_couple_json
Exemplo n.º 9
0
def setup(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client):
    global initial_ledger_size
    A, B, C, D = txnPoolNodeSet  # type: TestNode
    lagged_node = A
    frm = [B, C, D]
    delay(Propagate, frm=frm, to=lagged_node, howlong=howlong)
    # Delay MessageRep by long simulating loss as if Propagate is missing, it
    # is requested
    A.nodeIbStasher.delay(msg_rep_delay(10 * howlong, [
        PROPAGATE,
    ]))
    initial_ledger_size = lagged_node.domainLedger.size
    request_couple_json = sdk_send_random_requests(looper, sdk_pool_handle,
                                                   sdk_wallet_client, 1)
    return request_couple_json
Exemplo n.º 10
0
def electTieFixture(txnPoolNodeSet):
    A, B, C, D = txnPoolNodeSet

    for node in [C, D]:
        node.delaySelfNomination(10)

    delay(Nomination, frm=A, to=(B, D), howlong=5)
    delay(Nomination, frm=B, to=(A, C), howlong=5)
    delay(Nomination, frm=C, to=(D, B), howlong=5)
    delay(Nomination, frm=D, to=(C, A), howlong=5)
def electTieFixture(txnPoolNodeSet):
    A, B, C, D = txnPoolNodeSet

    for node in [C, D]:
        node.delaySelfNomination(10)

    delay(Nomination, frm=A, to=(B, D), howlong=5)
    delay(Nomination, frm=B, to=(A, C), howlong=5)
    delay(Nomination, frm=C, to=(D, B), howlong=5)
    delay(Nomination, frm=D, to=(C, A), howlong=5)
def electTieFixture(startedNodes: TestNodeSet):
    A, B, C, D = startedNodes.nodes.values()

    for node in [C, D]:
        node.delaySelfNomination(10)

    delay(Nomination, frm=A, to=(B, D), howlong=5)
    delay(Nomination, frm=B, to=(A, C), howlong=5)
    delay(Nomination, frm=C, to=(D, B), howlong=5)
    delay(Nomination, frm=D, to=(C, A), howlong=5)
def electTieFixture(startedNodes: TestNodeSet):
    A, B, C, D = startedNodes.nodes.values()

    for node in [C, D]:
        node.delaySelfNomination(10)

    delay(Nomination, frm=A, to=(B, D), howlong=5)
    delay(Nomination, frm=B, to=(A, C), howlong=5)
    delay(Nomination, frm=C, to=(D, B), howlong=5)
    delay(Nomination, frm=D, to=(C, A), howlong=5)
def setup(
    txnPoolNodeSet,
    looper,
    sdk_pool_handle,
    sdk_wallet_client,
):
    def _clean():
        pass

    A, B, C, D = txnPoolNodeSet  # type: TestNode
    delay(Propagate, frm=[B, C, D], to=A, howlong=howlong)
    # Delay MessageRep by long simulating loss as if Propagate is missing, it
    # is requested
    A.nodeIbStasher.delay(msg_rep_delay(10 * howlong, [
        PROPAGATE,
    ]))
    # disable _clean method which remove req.key from requests map
    A.requests._clean = types.MethodType(_clean, A.requests)
    request_couple_json = sdk_send_random_requests(looper, sdk_pool_handle,
                                                   sdk_wallet_client, 1)
    return request_couple_json
def setup(nodeSet):
    A, B, C, D = nodeSet.nodes.values()  # type: TestNode
    delay(Propagate, frm=[B, C, D], to=A, howlong=5)
def setup(nodeSet):
    A, B, C, D = nodeSet.nodes.values()
    A.clientIbStasher.delay(lambda x: delaySec)
    delay(Propagate, frm=[C, D], to=A, howlong=howlong)
def setup(nodeSet):
    A, B, C, D = nodeSet.nodes.values()  # type: TestNode
    delay(Propagate, frm=[B, C, D], to=A, howlong=howlong)
    # Delay MessageRep by long simulating loss as if Propagate is missing, it is requested
    delay(MessageRep, frm=[B, C, D], to=A, howlong=10 * howlong)
Exemplo n.º 18
0
def setup(nodeSet):
    A, B, C, D = nodeSet.nodes.values()  # type: TestNode
    delay(Propagate, frm=[B, C, D], to=A, howlong=5)
def setup(txnPoolNodeSet):
    A, B, C, D = txnPoolNodeSet
    A.clientIbStasher.delay(lambda x: delaySec)
    delay(Propagate, frm=[C, D], to=A, howlong=howlong)