Пример #1
0
def testMerkleProofForNonFirstLeaf(looper, nodeSet, wallet1, client1, replied1):
    req2 = sendRandomRequest(wallet1, client1)
    f = nodeSet.f
    looper.run(eventually(checkSufficientRepliesRecvd, client1.inBox, req2.reqId
                          , f, retryWait=1, timeout=15))
    replies = client1.getRepliesFromAllNodes(*req2.key).values()
    assert Client.verifyMerkleProof(*replies)
Пример #2
0
def testMerkleProofForNonFirstLeaf(looper, nodeSet, client1: Client, replied1):
    req2 = sendRandomRequest(client1)
    f = nodeSet.f
    looper.run(
        eventually(checkSufficientRepliesRecvd,
                   client1.inBox,
                   req2.reqId,
                   f,
                   retryWait=1,
                   timeout=15))
    replies = client1.getRepliesFromAllNodes(req2.reqId).values()
    assert Client.verifyMerkleProof(*replies)
Пример #3
0
def testMerkleProofForFirstLeaf(client1: TestClient, replied1):
    replies = client1.getRepliesFromAllNodes(*replied1.key).values()
    assert Client.verifyMerkleProof(*replies)
Пример #4
0
def testMerkleProofForNonFirstLeaf(looper, nodeSet, wallet1, client1,
                                   replied1):
    req2 = sendRandomRequest(wallet1, client1)
    waitForSufficientRepliesForRequests(looper, client1, requests=[req2])
    replies = client1.getRepliesFromAllNodes(*req2.key).values()
    assert Client.verifyMerkleProof(*replies)
Пример #5
0
def testMerkleProofForFirstLeaf(client1: TestClient, replied1):
    replies = client1.getRepliesFromAllNodes(*replied1.key).values()
    assert Client.verifyMerkleProof(*replies)