From 93c190d6461d931d0a3b8a4b2d29c7a027bebdb1 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 15 Mar 2017 12:24:55 -0700 Subject: [PATCH] node/cli: more config options. --- bin/cli | 3 ++- lib/node/node.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/cli b/bin/cli index 9769ce29..ba82e19e 100755 --- a/bin/cli +++ b/bin/cli @@ -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); diff --git a/lib/node/node.js b/lib/node/node.js index d7014239..cac1075c 100644 --- a/lib/node/node.js +++ b/lib/node/node.js @@ -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');