diff --git a/bin/node b/bin/node index 4e1f9a314..1eb955b5e 100755 --- a/bin/node +++ b/bin/node @@ -22,7 +22,7 @@ if (process.argv.indexOf('--version') !== -1 const FullNode = require('../lib/node/fullnode'); const node = new FullNode({ - config: true, + file: true, argv: true, env: true, logFile: true, diff --git a/bin/wallet b/bin/wallet index 8630592e5..4cf1d4e2a 100755 --- a/bin/wallet +++ b/bin/wallet @@ -22,7 +22,7 @@ if (process.argv.indexOf('--version') !== -1 const Node = require('../lib/wallet/node'); const node = new Node({ - config: true, + file: true, argv: true, env: true, logFile: true, diff --git a/lib/node/node.js b/lib/node/node.js index be96072f1..a8f9ecb45 100644 --- a/lib/node/node.js +++ b/lib/node/node.js @@ -43,7 +43,7 @@ class Node extends EventEmitter { this.config.inject(options); this.config.load(options); - if (options.config) + if (options.file || options.config) this.config.open(config); this.network = Network.get(this.config.getSuffix()); diff --git a/lib/wallet/plugin.js b/lib/wallet/plugin.js index e20aff97e..f2e6df198 100644 --- a/lib/wallet/plugin.js +++ b/lib/wallet/plugin.js @@ -34,7 +34,9 @@ class Plugin extends EventEmitter { super(); this.config = node.config.filter('wallet'); - this.config.open('wallet.conf'); + + if (node.config.options.file) + this.config.open('wallet.conf'); this.network = node.network; this.logger = node.logger;