diff --git a/app/utils.js b/app/utils.js index dee2b30c5..fac241c52 100644 --- a/app/utils.js +++ b/app/utils.js @@ -586,8 +586,10 @@ function getTxTotalInputOutputValues(tx, txInputs, blockHeight) { } for (var i = 0; i < tx.vout.length; i++) { + if (tx.vout[i].value) { totalOutputValue = totalOutputValue.plus(new Decimal(tx.vout[i].value)); } + } } catch (err) { logError("2308sh0sg44", err, {tx:tx, txInputs:txInputs, blockHeight:blockHeight}); } diff --git a/package.json b/package.json index 67fe8eda2..ba880dcf4 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,4 @@ -{ + { "name": "btc-rpc-explorer", "version": "3.2.0", "description": "Open-source, self-hosted Bitcoin explorer", diff --git a/views/block.pug b/views/block.pug index 3b003f770..bb6ffdadd 100644 --- a/views/block.pug +++ b/views/block.pug @@ -158,7 +158,7 @@ block content span 0 +contentSection("Technical Details", true, "blockPageShowTechSummary") - +summaryRow(6 + (result.getblock.weight ? 1 : 0) + (result.getblock.size ? 1 : 0) + (result.blockstats ? 1 : 0) + (result.blockstats && result.blockstats.utxo_increase ? 1 : 0) + (result.blockstats && result.blockstats.maxtxsize ? 1 : 0)) + +summaryRow(5 + (result.getblock.weight ? 1 : 0) + (result.getblock.size ? 1 : 0) + (result.blockstats ? 1 : 0) + (result.blockstats && result.blockstats.utxo_increase ? 1 : 0) + (result.blockstats && result.blockstats.maxtxsize ? 1 : 0) + (result.getblock.difficulty ? 1 : 0)) if (result.getblock.weight) +summaryItem("Weight", null, "wu", "Weight Units") span #{result.getblock.weight.toLocaleString()} @@ -194,17 +194,18 @@ block content else | 1 - +summaryItem("Difficulty") - - var difficultyData = utils.formatLargeNumber(result.getblock.difficulty, 3); - - if (result.getblock.difficulty > 1000) - span.border-dotted(title=parseFloat(result.getblock.difficulty).toLocaleString(), data-bs-toggle="tooltip") - span #{difficultyData[0]} - span x 10 - sup #{difficultyData[1].exponent} - - else - span #{new Decimal(result.getblock.difficulty).toDP(3)} + if (result.getblock.difficulty) + +summaryItem("Difficulty") + - var difficultyData = utils.formatLargeNumber(result.getblock.difficulty, 3); + + if (result.getblock.difficulty > 1000) + span.border-dotted(title=parseFloat(result.getblock.difficulty).toLocaleString(), data-bs-toggle="tooltip") + span #{difficultyData[0]} + span x 10 + sup #{difficultyData[1].exponent} + + else + span #{new Decimal(result.getblock.difficulty).toDP(3)} if (result.blockstats && result.blockstats.utxo_increase) +summaryItem("UTXO Δ") diff --git a/views/index.pug b/views/index.pug index 875fcb4bb..0562b4763 100644 --- a/views/index.pug +++ b/views/index.pug @@ -70,11 +70,11 @@ block content - include includes/index-network-summary.pug + //include includes/index-network-summary.pug - if (true || nextBlockTemplate) + if (false && nextBlockTemplate) if (false) pre code.json #{JSON.stringify(nextBlockFeeRateGroups, null, 4)}