コード例 #1
0
def demo_merkle():
    RB = MerkleRedBlack()
    D = RB.E
    print D
    for i in range(10):
        D = RB.insert(i, D)
    print D
コード例 #2
0
def demo_merkle():
    RB = MerkleRedBlack()
    D = RB.E
    print D
    for i in range(10):
        D = RB.insert(i, D)
    print D
コード例 #3
0
def demo_recordreplay():
    RB = MerkleRedBlack()
    D = RB.E
    print D
    for i in range(10):
        D = RB.insert(i, D)
    print D

    roothash = D[0]

    record = RecordTraversal()
    for i in range(10):
        D = record.delete(i, D)
    print D
    print record.VO

    replay = ReplayTraversal(record.VO)
    D = roothash
    for i in range(9):
        D = replay.delete(i, D)
    print D
コード例 #4
0
def demo_recordreplay():
    RB = MerkleRedBlack()
    D = RB.E
    print D
    for i in range(10):
        D = RB.insert(i, D)
    print D

    roothash = D[0]

    record = RecordTraversal()
    for i in range(10):
        D = record.delete(i, D)
    print D
    print record.VO

    replay = ReplayTraversal(record.VO)
    D = roothash
    for i in range(9):
        D = replay.delete(i, D)
    print D