node/cli: more config options.
This commit is contained in:
parent
2e4a759487
commit
93c190d646
3
bin/cli
3
bin/cli
@ -285,7 +285,8 @@ CLI.prototype.sendTX = co(function* sendTX() {
|
|||||||
passphrase: this.config.str('passphrase'),
|
passphrase: this.config.str('passphrase'),
|
||||||
outputs: [output],
|
outputs: [output],
|
||||||
smart: this.config.bool('smart'),
|
smart: this.config.bool('smart'),
|
||||||
rate: this.config.str('rate')
|
rate: this.config.str('rate'),
|
||||||
|
subtractFee: this.config.bool('subtract-fee')
|
||||||
};
|
};
|
||||||
|
|
||||||
tx = yield this.wallet.send(options);
|
tx = yield this.wallet.send(options);
|
||||||
|
|||||||
@ -17,6 +17,7 @@ var workerPool = require('../workers/workerpool').pool;
|
|||||||
var ec = require('../crypto/ec');
|
var ec = require('../crypto/ec');
|
||||||
var native = require('../utils/native');
|
var native = require('../utils/native');
|
||||||
var Config = require('./config');
|
var Config = require('./config');
|
||||||
|
var SigCache = require('../script/sigcache');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class from which every other
|
* Base class from which every other
|
||||||
@ -70,6 +71,17 @@ Node.prototype.initOptions = function initOptions() {
|
|||||||
var logger = new Logger();
|
var logger = new Logger();
|
||||||
var config = this.config;
|
var config = this.config;
|
||||||
|
|
||||||
|
Network.set(this.config.network);
|
||||||
|
|
||||||
|
workerPool.set({
|
||||||
|
enabled: this.config.bool('use-workers'),
|
||||||
|
size: this.config.num('max-workers'),
|
||||||
|
timeout: this.config.bool('worker-timeout')
|
||||||
|
});
|
||||||
|
|
||||||
|
if (this.config.has('sigcache-size'))
|
||||||
|
SigCache.resize(this.config.num('sigcache-size'));
|
||||||
|
|
||||||
if (config.has('logger'))
|
if (config.has('logger'))
|
||||||
logger = config.obj('logger');
|
logger = config.obj('logger');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user