Merge pull request #563 from tuxcanfly/fix-config-file
multi: pass new Node option `file` to wallet plugin
This commit is contained in:
commit
b3fd9656f9
2
bin/node
2
bin/node
@ -22,7 +22,7 @@ if (process.argv.indexOf('--version') !== -1
|
|||||||
const FullNode = require('../lib/node/fullnode');
|
const FullNode = require('../lib/node/fullnode');
|
||||||
|
|
||||||
const node = new FullNode({
|
const node = new FullNode({
|
||||||
config: true,
|
file: true,
|
||||||
argv: true,
|
argv: true,
|
||||||
env: true,
|
env: true,
|
||||||
logFile: true,
|
logFile: true,
|
||||||
|
|||||||
@ -22,7 +22,7 @@ if (process.argv.indexOf('--version') !== -1
|
|||||||
const Node = require('../lib/wallet/node');
|
const Node = require('../lib/wallet/node');
|
||||||
|
|
||||||
const node = new Node({
|
const node = new Node({
|
||||||
config: true,
|
file: true,
|
||||||
argv: true,
|
argv: true,
|
||||||
env: true,
|
env: true,
|
||||||
logFile: true,
|
logFile: true,
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class Node extends EventEmitter {
|
|||||||
this.config.inject(options);
|
this.config.inject(options);
|
||||||
this.config.load(options);
|
this.config.load(options);
|
||||||
|
|
||||||
if (options.config)
|
if (options.file || options.config)
|
||||||
this.config.open(config);
|
this.config.open(config);
|
||||||
|
|
||||||
this.network = Network.get(this.config.getSuffix());
|
this.network = Network.get(this.config.getSuffix());
|
||||||
|
|||||||
@ -34,7 +34,9 @@ class Plugin extends EventEmitter {
|
|||||||
super();
|
super();
|
||||||
|
|
||||||
this.config = node.config.filter('wallet');
|
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.network = node.network;
|
||||||
this.logger = node.logger;
|
this.logger = node.logger;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user