Browse Source

derive addresses in series

activeAddress
Ivan Socolsky 10 years ago
parent
commit
55655296e3
  1. 4
      lib/server.js
  2. 1
      test/integration/server.js

4
lib/server.js

@ -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);

1
test/integration/server.js

@ -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…
Cancel
Save