fixed bug that was removing transactions from the cached block
This commit is contained in:
parent
3c355c30a9
commit
78870fc56e
@ -270,12 +270,15 @@ TxController.prototype.list = function(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.node.services.bitcoind.getBlockHeader(block.hash, function(err, blockInfo) {
|
self.node.services.bitcoind.getBlockHeader(block.hash, function(err, blockInfo) {
|
||||||
var txs = block.transactions;
|
var totalTxs = block.transactions.length;
|
||||||
var totalTxs = txs.length;
|
var txs;
|
||||||
|
|
||||||
if(!_.isUndefined(page)) {
|
if(!_.isUndefined(page)) {
|
||||||
txs = txs.splice(page * pageLength, pageLength);
|
var start = page * pageLength;
|
||||||
|
txs = block.transactions.slice(start, start + pageLength);
|
||||||
pagesTotal = Math.ceil(totalTxs / pageLength);
|
pagesTotal = Math.ceil(totalTxs / pageLength);
|
||||||
|
} else {
|
||||||
|
txs = block.transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
async.mapSeries(txs, function(tx, next) {
|
async.mapSeries(txs, function(tx, next) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user