From e9bf1a21240b97edb3e4d1d5be8b21b5b6ce32d5 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Mon, 8 Jun 2015 14:08:40 -0500 Subject: link to nextblockhash --- rpcblockchainexplorer/api.py | 8 +++++++- rpcblockchainexplorer/templates/block.html | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/rpcblockchainexplorer/api.py b/rpcblockchainexplorer/api.py index e828f4c..95b0dbb 100644 --- a/rpcblockchainexplorer/api.py +++ b/rpcblockchainexplorer/api.py @@ -208,7 +208,13 @@ def _getblock(blockhash): # don't display txids in the block output del block["tx"] - return render_template("block.html", block=block, txids=txids) + if "nextblockhash" in block.keys(): + nextblockhash = block["nextblockhash"] + del block["nextblockhash"] + else: + nextblockhash = None + + return render_template("block.html", block=block, txids=txids, nextblockhash=nextblockhash) @api.route("/transaction/") def _transaction(txid): diff --git a/rpcblockchainexplorer/templates/block.html b/rpcblockchainexplorer/templates/block.html index 0613237..1bebc6e 100644 --- a/rpcblockchainexplorer/templates/block.html +++ b/rpcblockchainexplorer/templates/block.html @@ -8,6 +8,12 @@ {{ block[key_name] }} {% endfor %} + {% if nextblockhash != None %} + + nextblockhash + {{ nextblockhash }} + + {% endif %}

Transactions

-- cgit v1.2.3