From b5fc0f5b9a66c93ff5b982e93a2e616802bd3805 Mon Sep 17 00:00:00 2001 From: Aakil Fernandes Date: Fri, 20 Nov 2015 11:18:32 -0500 Subject: [PATCH 1/2] add testnet option --- lib/blockchain.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/blockchain.js b/lib/blockchain.js index 9ab5deaf..adf0f871 100644 --- a/lib/blockchain.js +++ b/lib/blockchain.js @@ -27,6 +27,10 @@ Blockchain.prototype.generate_basic_command = function() { cmd += "--networkid " + config.networkId + " "; cmd += "--rpccorsdomain \"" + config.rpcWhitelist + "\" "; + if(config.testnet !== void 0){ + cmd += "--testnet " + } + if (config.minerthreads !== void 0) { cmd += "--minerthreads \"" + config.minerthreads + "\" "; } From af257808666d891e8a7024839f43f0afcfce48c7 Mon Sep 17 00:00:00 2001 From: Aakil Fernandes Date: Fri, 20 Nov 2015 11:57:51 -0500 Subject: [PATCH 2/2] add testnet to config --- lib/blockchain.js | 2 +- lib/config/blockchain.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/blockchain.js b/lib/blockchain.js index adf0f871..cb67b2d1 100644 --- a/lib/blockchain.js +++ b/lib/blockchain.js @@ -27,7 +27,7 @@ Blockchain.prototype.generate_basic_command = function() { cmd += "--networkid " + config.networkId + " "; cmd += "--rpccorsdomain \"" + config.rpcWhitelist + "\" "; - if(config.testnet !== void 0){ + if(config.testnet){ cmd += "--testnet " } diff --git a/lib/config/blockchain.js b/lib/config/blockchain.js index 99f861c3..bb93342a 100644 --- a/lib/config/blockchain.js +++ b/lib/config/blockchain.js @@ -51,7 +51,8 @@ BlockchainConfig.prototype.config = function(env) { mine_when_needed: config.mine_when_needed || false, whisper: config.whisper || false, account: config.account, - geth_extra_opts: config.geth_extra_opts + geth_extra_opts: config.geth_extra_opts, + testnet: config.testnet || false } return config;