From c347add2fd64872bc30d564acb2d56afe60c3304 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 23 Jul 2017 08:17:43 -0700 Subject: [PATCH] pool: refactor assertion. --- lib/net/pool.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/net/pool.js b/lib/net/pool.js index 56db1ad9..e03a6e12 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -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');