pool: refactor assertion.

This commit is contained in:
Christopher Jeffrey 2017-07-23 08:17:43 -07:00
parent 342d89d103
commit c347add2fd
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -3853,7 +3853,8 @@ PoolOptions.prototype.fromOptions = function fromOptions(options) {
if (options.bip150 != null) {
assert(typeof options.bip150 === 'boolean');
assert(!(options.bip150 && !this.bip151), 'Cannot enable bip150 without bip151.');
assert(!options.bip150 || this.bip151,
'Cannot enable bip150 without bip151.');
if (options.knownPeers) {
assert(typeof options.knownPeers === 'object');