Skip to content

Instantly share code, notes, and snippets.

@dvf
Created September 23, 2017 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvf/dc170428bb29d3a47e342e3266a87504 to your computer and use it in GitHub Desktop.
Save dvf/dc170428bb29d3a47e342e3266a87504 to your computer and use it in GitHub Desktop.
Step 9: Consensus (Retrieve Chain)
@app.route('/chain', methods=['GET'])
def full_chain():
response = {
'chain': blockchain.chain,
'length': len(blockchain.chain),
}
return jsonify(response), 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment