workers: minor.

This commit is contained in:
Christopher Jeffrey 2016-05-14 14:44:06 -07:00
parent 3a9a0d9840
commit 31c4b4622a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -35,7 +35,7 @@ function Workers(options) {
EventEmitter.call(this);
this.uid = 0;
this.size = options.size || Workers.CORES;
this.size = Math.max(2, options.size || Workers.CORES);
this.timeout = options.timeout || 60000;
this.network = bcoin.network.get(options.network);
this.children = [];
@ -208,6 +208,7 @@ Workers.prototype.mine = function mine(attempt, callback) {
* Represents a worker.
* @exports Worker
* @constructor
* @param {Workers} pool
* @param {Number} id - Worker ID.
* @property {Number} id
*/