Browse Source

fix for 0 records retrieved

activeAddress
Ivan Socolsky 10 years ago
parent
commit
3e279e74f2
  1. 4
      lib/blockchainexplorer.js

4
lib/blockchainexplorer.js

@ -47,8 +47,8 @@ function getTransactionsInsight(url, addresses, from, to, cb) {
}, function(err, res, txs) {
if (err || res.statusCode != 200) return cb(err || res);
// NOTE: Whenever Insight breaks communication with bitcoind, it returns invalid data but no error code.
if (!_.isArray(txs) || _.compact(txs).length == 0) return cb(new Error('Could not retrieve transactions from blockchain'));
if (!_.isArray(txs) || (txs.length != _.compact(txs).length)) return cb(new Error('Could not retrieve transactions from blockchain'));
return cb(null, txs);
});
};

Loading…
Cancel
Save