Browse Source

spv listtransactions limit vin parse count to 10 items

custom-ac-example
pbca26 7 years ago
parent
commit
26b5e3749b
  1. 7
      routes/shepherd/electrum/transactions.js

7
routes/shepherd/electrum/transactions.js

@ -1,6 +1,8 @@
const async = require('async');
const Promise = require('bluebird');
const MAX_VOUT_LENGTH = 10;
module.exports = (shepherd) => {
shepherd.sortTransactions = (transactions, sortBy) => {
return transactions.sort((b, a) => {
@ -143,7 +145,7 @@ module.exports = (shepherd) => {
const checkLoop = () => {
index2++;
if (index2 === decodedTx.inputs.length) {
if (index2 === decodedTx.inputs.length || index2 === MAX_VOUT_LENGTH) {
shepherd.log(`tx history decode inputs ${decodedTx.inputs.length} | ${index2} => main callback`, true);
const _parsedTx = {
network: decodedTx.network,
@ -199,8 +201,9 @@ module.exports = (shepherd) => {
callback();
shepherd.log(`tx history main loop ${json.length} | ${index}`, true);
} else {
callback2();
}
callback2();
}
if (_decodedInput.txid !== '0000000000000000000000000000000000000000000000000000000000000000') {

Loading…
Cancel
Save