listen for event sooner and increasing maxOutbound peers

This commit is contained in:
Justin Langston 2017-08-09 02:25:29 -04:00
parent 68fb731e83
commit fa7868e468
No known key found for this signature in database
GPG Key ID: EBB3714C72F9FE5D

View File

@ -18,11 +18,11 @@ Bcoin.prototype.start = function(callback) {
self._bcoin.open().then(function() {
self._bcoin.connect().then(function() {
self._bcoin.startSync();
log.info('Waiting for Bcoin to sync');
self._bcoin.pool.once('full', function() {
callback();
});
self._bcoin.startSync();
log.info('Waiting for Bcoin to sync');
});
});
};
@ -45,7 +45,9 @@ Bcoin.prototype._getConfig = function(options) {
logLevel: 'info',
port: options.port,
persistent: true,
workers: true
workers: true,
maxOutbound: 16,
loader: require
};
if (options.prefix) {
config.prefix = options.prefix;