Esempio n. 1
0
def demo_merkle():
    RB = MerkleRedBlack()
    D = RB.E
    print D
    for i in range(10):
        D = RB.insert(i, D)
    print D
Esempio n. 2
0
def demo_merkle():
    RB = MerkleRedBlack()
    D = RB.E
    print D
    for i in range(10):
        D = RB.insert(i, D)
    print D
Esempio n. 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
Esempio n. 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