def addSpy(num, connect): node = btcnet.getRandNode("nodeR", "Miner") spyName = spy + str(num) btcnet.renameNode(node, spyName) if connect: #Connect to all nodes nodeList = btcnet.getNodeList("nodeR") for node in nodeList: btcnet.connectNode(spyName, node)
def addMiner(): node = btcnet.getRandNode("nodeR") print "Making " + node + " a miner" btcnet.renameNode(node, "nodeMiner")
def getMiner(): return btcnet.getRandNode("Miner")
def addMiner(): node = btcnet.getRandNode("nodeR") miner = node + "Miner" btcnet.renameNode(node, miner)