Skip to content

Commit

Permalink
var rename: global.txindex -> global.txindexAvailable
Browse files Browse the repository at this point in the history
  • Loading branch information
janoside committed Feb 19, 2021
1 parent e60d524 commit 45c768f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions views/block-analysis.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ block content
a.btn.btn-sm.btn-primary.mb-1(href=("./block/" + result.getblock.hash)) « Block Details:
span.text-monospace ##{result.getblock.height.toLocaleString()}

if (!global.txindex)
if (!global.txindexAvailable)
div.alert.alert-warning.pb-0(role="alert")
h6.mb-2 Block Analysis Unavailable
- var msgMarkdown = "Your node does not have `txindex` enabled. Without it, running a block analysis is unsupported due to the inability to reliably retrieve transaction details.";
Expand Down Expand Up @@ -278,7 +278,7 @@ block endOfBody
script(src='./js/decimal.js')
script.
var txidChunkSize = !{txidChunkSize};
var txindexAvailable = !{global.txindex};
var txindexAvailable = !{global.txindexAvailable};
var txidChunks = !{JSON.stringify(utils.splitArrayIntoChunks(result.getblock.tx, txidChunkSize))};
var blockHeight = !{result.getblock.height};
var satsMultiplier = !{coinConfig.baseCurrencyUnit.multiplier};
Expand Down
6 changes: 3 additions & 3 deletions views/includes/block-content.pug
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ div.tab-content
- var sizeDeltaData = utils.formatLargeNumber(Math.abs(result.blockstats.utxo_size_inc), 1);
- var plusMinus = (result.blockstats.utxo_increase > 0) ? "+" : "";
if (result.blockstats.utxo_increase)
span #{plusMinus}#{result.blockstats.utxo_increase.toLocaleString()}
span #{plusMinus}#{result.blockstats.utxo_increase.toLocaleString()}
span.text-muted (#{sizePlusMinus}#{sizeDeltaData[0]}
small #{sizeDeltaData[1].abbreviation}B
span )
Expand Down Expand Up @@ -378,7 +378,7 @@ div.tab-content
else
span Transactions

if (global.txindex)
if (global.txindexAvailable)
a.ml-2.border-dotted(href=`./block-analysis/${result.getblock.hash}`, title="See a summary analysis of all transactions in this block.", data-toggle="tooltip") See Block Analysis »

if (false || (!config.demoSite && !crawlerBot && txCount > 20))
Expand All @@ -401,7 +401,7 @@ div.tab-content
- var fontawesomeOutputName = "sign-out-alt";

div
- tx_height_param = !global.txindex ? `@${result.getblock.height}` : ''
- tx_height_param = !global.txindexAvailable ? `@${result.getblock.height}` : ''
each tx, txIndex in result.transactions
//pre
// code.json.bg-light #{JSON.stringify(tx, null, 4)}
Expand Down
4 changes: 2 additions & 2 deletions views/transaction.pug
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ block content
- var msgMarkdown = "Blockchain `pruning` is enabled on your node. This setting tells your node that after validating transactions it may discard data that is non-essential for future validation needs.\n\nThe block that contains this transaction has been pruned, meaning that all non-essential data has been deleted, including the details of this transaction.";
| !{markdown(msgMarkdown)}

else if (!global.txindex)
else if (!global.txindexAvailable)
| !{markdown(noTxIndexMsg)}

if (result && result.getrawtransaction)
Expand Down Expand Up @@ -214,7 +214,7 @@ block content
else
small.data-tag.bg-primary #{minerInfo.name}

else if (!mempoolDetails && !global.txindex)
else if (!mempoolDetails && !global.txindexAvailable)
div.row
div.summary-table-label Fee Paid
div.summary-table-content.text-monospace
Expand Down

0 comments on commit 45c768f

Please sign in to comment.