node/cli: more config options.

This commit is contained in:
Christopher Jeffrey 2017-03-15 12:24:55 -07:00
parent 2e4a759487
commit 93c190d646
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 14 additions and 1 deletions

View File

@ -285,7 +285,8 @@ CLI.prototype.sendTX = co(function* sendTX() {
passphrase: this.config.str('passphrase'),
outputs: [output],
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);

View File

@ -17,6 +17,7 @@ var workerPool = require('../workers/workerpool').pool;
var ec = require('../crypto/ec');
var native = require('../utils/native');
var Config = require('./config');
var SigCache = require('../script/sigcache');
/**
* Base class from which every other
@ -70,6 +71,17 @@ Node.prototype.initOptions = function initOptions() {
var logger = new Logger();
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'))
logger = config.obj('logger');