derive addresses in series
This commit is contained in:
parent
634daf6450
commit
55655296e3
|
@ -1063,7 +1063,7 @@ WalletService.prototype.scan = function(opts, cb) {
|
|||
var allAddresses = [];
|
||||
|
||||
function deriveAddresses(size, derivator, cb) {
|
||||
async.map(_.range(size), function(i, next) {
|
||||
async.mapSeries(_.range(size), function(i, next) {
|
||||
setTimeout(function() {
|
||||
next(null, derivator());
|
||||
}, WalletService.scanConfig.DERIVATION_DELAY)
|
||||
|
@ -1109,7 +1109,7 @@ WalletService.prototype.scan = function(opts, cb) {
|
|||
}
|
||||
});
|
||||
|
||||
async.each(derivators, function(derivator, next) {
|
||||
async.eachSeries(derivators, function(derivator, next) {
|
||||
scanBranch(derivator, next);
|
||||
}, function(err) {
|
||||
if (err) return cb(err);
|
||||
|
|
|
@ -2483,6 +2483,7 @@ describe('Wallet service', function() {
|
|||
describe('#scan', function() {
|
||||
var scanConfigOld = WalletService.scanConfig;
|
||||
beforeEach(function() {
|
||||
this.timeout(5000);
|
||||
WalletService.scanConfig.SCAN_WINDOW = 2;
|
||||
WalletService.scanConfig.DERIVATION_DELAY = 0;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue