From b1fe37c260894e2aba9be965b3c8f0ba93429192 Mon Sep 17 00:00:00 2001 From: Chris Kleeschulte Date: Mon, 6 Nov 2017 19:08:35 -0500 Subject: [PATCH] Fixed missed call to next. --- lib/services/address/index.js | 4 +++- lib/services/mempool/index.js | 8 -------- test/services/db/index.unit.js | 3 +++ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 7b91e6da..7b2fa5ac 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -66,7 +66,7 @@ AddressService.prototype.getAddressHistory = function(addresses, options, callba addresses = [addresses]; } - async.eachLimit(addresses, 8, function(address, next) { + async.eachSeries(addresses, function(address, next) { self._getAddressTxidHistory(address, options, next); @@ -262,6 +262,8 @@ AddressService.prototype.getAddressUnspentOutputs = function(address, options, c }); + next(); + }); }, diff --git a/lib/services/mempool/index.js b/lib/services/mempool/index.js index f5705d67..1e31beb6 100644 --- a/lib/services/mempool/index.js +++ b/lib/services/mempool/index.js @@ -94,10 +94,6 @@ MempoolService.prototype.onReorg = function(args, callback) { var removalOps = []; - if (!this._enabled) { - return callback(null, removalOps); - } - var oldBlockList = args[1]; for(var i = 0; i < oldBlockList.length; i++) { @@ -155,10 +151,6 @@ MempoolService.prototype.onBlock = function(block, callback) { var self = this; var ops = []; - if (!self._enabled) { - return callback(null, ops); - } - for(var i = 0; i < block.txs.length; i++) { var tx = block.txs[i]; diff --git a/test/services/db/index.unit.js b/test/services/db/index.unit.js index 482d5554..3172386f 100644 --- a/test/services/db/index.unit.js +++ b/test/services/db/index.unit.js @@ -34,6 +34,9 @@ describe('DB', function() { describe('#start', function() { it('should start the db service by creating a db dir, ' + ' if necessary, and setting the store', function(done) { + + dbService._setDataPath(); + dbService.start(function() { dbService._store.should.be.instanceOf(Levelup); done();