def start(): global node, blockchain genesis = Utility.create_genesis_block() blockchain = Blockchain(genesis.index, genesis.timemade, genesis.proof_of_work, genesis.effort, genesis.transactions, genesis.previous_hash) node.config['SECRET_KEY'] = Utility.createHexdigest(User.password) node.run(host="0.0.0.0", port=variables.PORT)
def start(e): global node, blockchain,mining_process,event if not len(Variables.PEER_NODES) > 0: genesis = Utility.create_genesis_block() blockchain = Blockchain(genesis) else: consensus() event = e mining_process = Process(target=Mining.mine, args=(event,)) mining_process.start() logging.debug("Mining_classes Started") node.config['SECRET_KEY'] = Utility.createHexdigest(User.password) node.run(host="0.0.0.0", port=Variables.PORT)
def start(a): global q q = a global node node.config['SECRET_KEY'] = Utility.createHexdigest(User.password) node.run(host="0.0.0.0", port=variables.PORT)