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. 15
      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. Build with Node.js, express, bootstrap-v4.
Simple, stateless Bitcoin blockchain explorer, via RPC. Built 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.
# 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
## Prerequisites
@ -39,5 +45,5 @@ This tool is intended to be a simple, stateless, self-hosted explorer for the Bi
### Transaction, Raw JSON
# ![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)

15
views/transaction.pug

@ -14,6 +14,8 @@ block content
a(href="/")
strong #{host}
span :#{port}
if (result.getrawtransaction.blockhash)
li(class="breadcrumb-item")
a(href=("/block/" + result.getrawtransaction.blockhash)) Block #{result.getblock.height}
li(class="breadcrumb-item active") Transaction
@ -60,12 +62,21 @@ block content
tr
th(class="table-active properties-header") Included in Block
td
if (result.getblock)
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
th(class="table-active properties-header") Timestamp
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
// th(class="table-active properties-header") Transaction ID
@ -107,8 +118,8 @@ block content
tr
th(class="table-active properties-header") Confirmations
td
if (result.getrawtransaction.confirmations == 0)
strong(class="text-danger") #{result.getrawtransaction.confirmations} (Unconfirmed!)
if (!result.getrawtransaction.confirmations || result.getrawtransaction.confirmations == 0)
strong(class="text-danger") 0 (unconfirmed)
else if (result.getrawtransaction.confirmations < 6)
strong(class="text-warning") #{result.getrawtransaction.confirmations}
else

Loading…
Cancel
Save