def blockchain(): #this is the screen that displays the blockchain! #print(type(blockchainObj.chain)); blockchainObj.resolveConflicts(); #blockchain is the blockchain object passed into the function print(blockchainObj); return render_template('blockchain.html', title = "Blockchain", blockchain = blockchainObj);
def consensus(): replaced = blockchainObj.resolveConflicts() if replaced: response = { "message": "Our chain was replaced", "new_chain": blockchainObj.chainJSONencode(), } else: response = { "message": "Our chain is authoritative", "chain": blockchainObj.chainJSONencode(), } return jsonify(response), 200
def consensus(): replaced = blockchainObj.resolveConflicts() if replaced: response = { 'message': 'Our chain was replaced', 'new_chain': blockchainObj.chainJSONencode() } else: response = { 'message': 'Our chain is authoritative', 'chain': blockchainObj.chainJSONencode() } return jsonify(response), 200
def blockchain(): # print(type(blockchainObj.chain)); blockchainObj.resolveConflicts() return render_template("blockchain.html", title="Blockchain", blockchain=blockchainObj)
def home(): blockchainObj.resolveConflicts() return render_template("blockchain.html", title="Blockchain", blockchain=blockchainObj)
def home(): blockchainObj.resolveConflicts(); #instead, render a template that explains the blockchain and what it does return render_template('home.html', title = "Blockchain", blockchain = blockchainObj);