bitcoind: fix txid pagination
This commit is contained in:
parent
b69d848352
commit
af573b765b
|
@ -515,12 +515,9 @@ Bitcoin.prototype._getAddressStrings = function(addresses) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Bitcoin.prototype._paginateTxids = function(fullTxids, from, to) {
|
Bitcoin.prototype._paginateTxids = function(fullTxids, from, to) {
|
||||||
var totalCount = fullTxids.length;
|
|
||||||
var txids;
|
var txids;
|
||||||
if (from >= 0 && to >= 0) {
|
if (from >= 0 && to >= 0) {
|
||||||
var fromOffset = totalCount - from;
|
txids = fullTxids.slice(from, to);
|
||||||
var toOffset = totalCount - to;
|
|
||||||
txids = fullTxids.slice(toOffset, fromOffset);
|
|
||||||
} else {
|
} else {
|
||||||
txids = fullTxids;
|
txids = fullTxids;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue