diff --git a/src/main.rs b/src/main.rs
index ee3838c..34a4700 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -98,7 +98,9 @@ fn search(value: &RawStr) -> Redirect {
// We basically check the length of the search value and
// attempt to redirect to the appropriate route.
let sl: usize = value.len();
- if sl < 8 {
+ if sl == 0 {
+ return Redirect::found(uri!(index));
+ } else if sl < 8 {
// Less than 8 characters is probably a block height. If it can
// be parsed as valid u32 then redirect to `get_block_by_height`,
// otherwise redirect to the error response.
diff --git a/templates/index.html.tera b/templates/index.html.tera
index b536981..52e3534 100644
--- a/templates/index.html.tera
+++ b/templates/index.html.tera
@@ -56,7 +56,7 @@
-
{{ daemon_info.database_size / 1000000000 }} GB
+ {% if daemon_info.database_size %}{{ daemon_info.database_size / 1000000000 }} GB{% else %}?{% endif %}
@@ -83,7 +83,10 @@
- Transaction Pool ({{ daemon_info.tx_pool_size }})
+
+ Transaction Pool ({{ daemon_info.tx_pool_size }})
+ Transactions that have yet to be mined into a block. This is where payments sit in a PENDING state.
+
Hash |
Amount |
diff --git a/templates/transaction.html.tera b/templates/transaction.html.tera
new file mode 100644
index 0000000..5396af6
--- /dev/null
+++ b/templates/transaction.html.tera
@@ -0,0 +1,103 @@
+{% extends "base" %}
+
+{% block content %}
+
+
+
+
+
+
+ Transaction {{ block_header.height }}
+
+
+
+
+
+
+ {{ block_header.block_size }} bytes
+
+
+
+
+
+ {{ block_header.depth }}
+
+
+
+
+
+ {{ block_header.difficulty }}
+
+
+
+
+
+ {% if tx_hashes %}{{ tx_hashes | length }}{% else %}0{% endif %}
+
+
+
+
+
+ {{ block_header.orphan_status }}
+
+
+
+
+
+ {{ block_header.nonce }}
+
+
+
+
+
+
+
+
+
+
+
+{% endblock content %}