Skip to content

Instantly share code, notes, and snippets.

@dvf
Created September 23, 2017 20:31
Show Gist options
  • Save dvf/dc170428bb29d3a47e342e3266a87504 to your computer and use it in GitHub Desktop.
Save dvf/dc170428bb29d3a47e342e3266a87504 to your computer and use it in GitHub Desktop.

Revisions

  1. dvf created this gist Sep 23, 2017.
    7 changes: 7 additions & 0 deletions blockchain.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    @app.route('/chain', methods=['GET'])
    def full_chain():
    response = {
    'chain': blockchain.chain,
    'length': len(blockchain.chain),
    }
    return jsonify(response), 200