pool: refactor assertion.
This commit is contained in:
parent
342d89d103
commit
c347add2fd
@ -3853,7 +3853,8 @@ PoolOptions.prototype.fromOptions = function fromOptions(options) {
|
|||||||
|
|
||||||
if (options.bip150 != null) {
|
if (options.bip150 != null) {
|
||||||
assert(typeof options.bip150 === 'boolean');
|
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) {
|
if (options.knownPeers) {
|
||||||
assert(typeof options.knownPeers === 'object');
|
assert(typeof options.knownPeers === 'object');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user