Skip to content

Commit b52d45a

Browse files
committed
fix: render blocks without txindex
1 parent 67586b2 commit b52d45a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

views/includes/shared-mixins.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ mixin txList(visibleTxs, txCount, limit, offset, inputsByTxid, options={})
159159

160160
- var tx_height_param = (!global.txindexAvailable && txBlockHeight) ? `@${txBlockHeight}` : '';
161161

162-
- var txInputs = inputsByTxid[tx.txid];
162+
- var txInputs = (inputsByTxid && inputsByTxid[tx.txid]) || {};
163163
- var blockHeight = txBlockHeight != undefined ? txBlockHeight : -1;
164164
- var totalIOValues = utils.getTxTotalInputOutputValues(tx, txInputs, blockHeight);
165165

@@ -184,7 +184,7 @@ mixin txList(visibleTxs, txCount, limit, offset, inputsByTxid, options={})
184184

185185

186186
- var hasInputAddresses = false;
187-
- var coinbaseTx = false;
187+
- var coinbaseTx = !!(tx && tx.vin && tx.vin.some(txVin => txVin.coinbase));
188188
if (tx && tx.vin && inputsByTxid && inputsByTxid[tx.txid])
189189
- var txInputs = inputsByTxid[tx.txid];
190190
each txVin, txVinIndex in tx.vin

0 commit comments

Comments
 (0)