diff --git a/src/page.h b/src/page.h index f0e82cb..4c43d1d 100644 --- a/src/page.h +++ b/src/page.h @@ -348,6 +348,8 @@ namespace xmreg { // transcation in the block vector tx_hashes = blk.tx_hashes; + bool have_txs = !blk.tx_hashes.empty(); + // initalise page tempate map with basic info about blockchain mstch::map context { {"blk_hash" , blk_hash_str}, diff --git a/src/templates/block.html b/src/templates/block.html index 556ddff..e72eb4f 100644 --- a/src/templates/block.html +++ b/src/templates/block.html @@ -1,15 +1,15 @@
-

Block hash (height): {{blk_hash}} ({{blk_height}})

+

Block hash (height): {{blk_hash}} ({{blk_height}})

{{#have_prev_hash}} -

Previous block: {{prev_hash}}

+
Previous block: {{prev_hash}}
{{/have_prev_hash}} {{#have_next_hash}} -

Next block: {{next_hash}}

+
Next block: {{next_hash}}
{{/have_next_hash}} @@ -18,7 +18,7 @@ Timestamp [UCT]:{{blk_timestamp}} Age {{age_format}}:{{blk_age}} - Time from previous block [h:m:s]:{{delta_time}} + Δ [h:m:s]:{{delta_time}} Major version:{{major_ver}}