Browse Source

Merge branch 'master' of github.com:janoside/btc-rpc-explorer

fix-133-memory-crash
Dan Janosik 8 years ago
parent
commit
6ff9bd85d9
  1. 16
      README.md
  2. 27
      views/transaction.pug

16
README.md

@ -1,11 +1,17 @@
# ![BTC RPC Explorer](public/img/logo/logo-64.png) # ![BTC RPC Explorer](public/img/logo/logo-64.png) BTC RPC Explorer
# BTC RPC Explorer Simple, stateless Bitcoin blockchain explorer, via RPC. Built with Node.js, express, bootstrap-v4.
Simple, stateless Bitcoin blockchain explorer, via RPC. Build with Node.js, express, bootstrap-v4.
This tool is intended to be a simple, stateless, self-hosted explorer for the Bitcoin blockchain, driven by RPC calls to your own bitcoind node. Because it is stateless, it is easy to run but lacks some (many?) of the features of other explorers. This tool is intended to be a simple, stateless, self-hosted explorer for the Bitcoin blockchain, driven by RPC calls to your own bitcoind node. Because it is stateless, it is easy to run but lacks some (many?) of the features of other explorers.
# Features
* List of recent blocks
* Browse blocks by height, in ascending or descending order
* View block details
* View transaction details, with navigation backward via spent outputs
* View raw JSON output used to generate most pages
# Getting started # Getting started
## Prerequisites ## Prerequisites
@ -39,5 +45,5 @@ This tool is intended to be a simple, stateless, self-hosted explorer for the Bi
### Transaction, Raw JSON ### Transaction, Raw JSON
# ![Connect](public/img/screenshots/transaction-raw.png) # ![Connect](public/img/screenshots/transaction-raw.png)
### List of all Blocks ### List of Blocks by height (in ascending order)
# ![Connect](public/img/screenshots/blocks.png) # ![Connect](public/img/screenshots/blocks.png)

27
views/transaction.pug

@ -14,8 +14,10 @@ block content
a(href="/") a(href="/")
strong #{host} strong #{host}
span :#{port} span :#{port}
li(class="breadcrumb-item")
a(href=("/block/" + result.getrawtransaction.blockhash)) Block #{result.getblock.height} if (result.getrawtransaction.blockhash)
li(class="breadcrumb-item")
a(href=("/block/" + result.getrawtransaction.blockhash)) Block #{result.getblock.height}
li(class="breadcrumb-item active") Transaction li(class="breadcrumb-item active") Transaction
h1(class="h2") Transaction h1(class="h2") Transaction
@ -60,12 +62,21 @@ block content
tr tr
th(class="table-active properties-header") Included in Block th(class="table-active properties-header") Included in Block
td td
a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash} if (result.getblock)
span(class="text-muted") (#{result.getblock.height}) a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash}
if (result.getblock.height)
span(class="text-muted") (#{result.getblock.height})
else
span N/A
span(class="text-muted") (unconfirmed)
tr tr
th(class="table-active properties-header") Timestamp th(class="table-active properties-header") Timestamp
td #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} (utc) if (result.getrawtransaction.time)
td #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} (utc)
else
td N/A
span(class="text-muted") (unconfirmed)
//tr //tr
// th(class="table-active properties-header") Transaction ID // th(class="table-active properties-header") Transaction ID
@ -107,8 +118,8 @@ block content
tr tr
th(class="table-active properties-header") Confirmations th(class="table-active properties-header") Confirmations
td td
if (result.getrawtransaction.confirmations == 0) if (!result.getrawtransaction.confirmations || result.getrawtransaction.confirmations == 0)
strong(class="text-danger") #{result.getrawtransaction.confirmations} (Unconfirmed!) strong(class="text-danger") 0 (unconfirmed)
else if (result.getrawtransaction.confirmations < 6) else if (result.getrawtransaction.confirmations < 6)
strong(class="text-warning") #{result.getrawtransaction.confirmations} strong(class="text-warning") #{result.getrawtransaction.confirmations}
else else
@ -268,4 +279,4 @@ block content
//pre #{JSON.stringify(result.txInputs, null, 4)} //pre #{JSON.stringify(result.txInputs, null, 4)}

Loading…
Cancel
Save