Beispiel #1
0
    time.sleep(3)
    n = random.choice(nodes)
    n.storeFile("constitution.txt")
    n = random.choice(nodes)

    blocks = n.retrieveFile("constitution.txt")
    for block in blocks:
        print block

    for n in nodes:
        print n.successorList


    for i in range(0,100):
        print "progress"
        n = random.choice(nodes)
        n.store(str(i)+"blah",str(i))



    for i in range(0,100):
        n = random.choice(nodes)
        print n.retrieve(str(i)+"blah")


    info = []    
    for n in nodes:
        info.append(n.myInfo())

    print sorted(info, key= lambda x: x[1])