예제 #1
0
파일: routes.py 프로젝트: vasuvius/dartcoin
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);
예제 #2
0
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
예제 #3
0
파일: routes.py 프로젝트: xscuvalar/GymCoin
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
예제 #4
0
def blockchain():
    # print(type(blockchainObj.chain));
    blockchainObj.resolveConflicts()
    return render_template("blockchain.html",
                           title="Blockchain",
                           blockchain=blockchainObj)
예제 #5
0
def home():
    blockchainObj.resolveConflicts()
    return render_template("blockchain.html",
                           title="Blockchain",
                           blockchain=blockchainObj)
예제 #6
0
파일: routes.py 프로젝트: vasuvius/dartcoin
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);