|
@ -356,7 +356,7 @@ function getBlockByHashWithTransactions(blockHash, txLimit, txOffset) { |
|
|
for (var i = 0; i < transactions.length; i++) { |
|
|
for (var i = 0; i < transactions.length; i++) { |
|
|
var transaction = transactions[i]; |
|
|
var transaction = transactions[i]; |
|
|
|
|
|
|
|
|
if (transaction) { |
|
|
if (transaction && transaction.vin) { |
|
|
for (var j = 0; j < Math.min(maxInputsTracked, transaction.vin.length); j++) { |
|
|
for (var j = 0; j < Math.min(maxInputsTracked, transaction.vin.length); j++) { |
|
|
if (transaction.vin[j].txid) { |
|
|
if (transaction.vin[j].txid) { |
|
|
vinTxids.push(transaction.vin[j].txid); |
|
|
vinTxids.push(transaction.vin[j].txid); |
|
@ -376,11 +376,13 @@ function getBlockByHashWithTransactions(blockHash, txLimit, txOffset) { |
|
|
transactions.forEach(function(tx) { |
|
|
transactions.forEach(function(tx) { |
|
|
txInputsByTransaction[tx.txid] = []; |
|
|
txInputsByTransaction[tx.txid] = []; |
|
|
|
|
|
|
|
|
|
|
|
if (tx && tx.vin) { |
|
|
for (var i = 0; i < Math.min(maxInputsTracked, tx.vin.length); i++) { |
|
|
for (var i = 0; i < Math.min(maxInputsTracked, tx.vin.length); i++) { |
|
|
if (vinTxById[tx.vin[i].txid]) { |
|
|
if (vinTxById[tx.vin[i].txid]) { |
|
|
txInputsByTransaction[tx.txid].push(vinTxById[tx.vin[i].txid]); |
|
|
txInputsByTransaction[tx.txid].push(vinTxById[tx.vin[i].txid]); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
resolve({ getblock:block, transactions:transactions, txInputsByTransaction:txInputsByTransaction }); |
|
|
resolve({ getblock:block, transactions:transactions, txInputsByTransaction:txInputsByTransaction }); |
|
|
}); |
|
|
}); |
|
|