Fix bip150 and bip151 configuration parsing

This commit is contained in:
Node 2017-07-20 16:44:41 +04:00
parent 7ef658049c
commit 361ffd2705

View File

@ -3853,7 +3853,7 @@ PoolOptions.prototype.fromOptions = function fromOptions(options) {
if (options.bip150 != null) {
assert(typeof options.bip150 === 'boolean');
assert(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');