From 1a436dcc1284a9ba55b2691347cdcbb1b0cbb025 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 20 Feb 2017 15:53:55 -0500 Subject: [PATCH] add support for light and fast options; add default pass folders --- boilerplate/config/blockchain.json | 8 +++++++- boilerplate/config/production/password | 1 - boilerplate/config/testnet/password | 1 + demo/config/blockchain.json | 9 ++++++++- demo/config/testnet/password | 1 + lib/cmds/blockchain/geth_commands.js | 8 ++++++++ 6 files changed, 25 insertions(+), 3 deletions(-) delete mode 100644 boilerplate/config/production/password create mode 100644 boilerplate/config/testnet/password create mode 100644 demo/config/testnet/password diff --git a/boilerplate/config/blockchain.json b/boilerplate/config/blockchain.json index 94050ca9..ee83f100 100644 --- a/boilerplate/config/blockchain.json +++ b/boilerplate/config/blockchain.json @@ -15,11 +15,17 @@ }, "testnet": { "networkType": "testnet", + "light": true, "rpcHost": "localhost", - "rpcPort": 8545 + "rpcPort": 8545, + "rpcCorsDomain": "http://localhost:8000", + "account": { + "password": "config/testnet/password" + } }, "livenet": { "networkType": "livenet", + "light": true, "rpcHost": "localhost", "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", diff --git a/boilerplate/config/production/password b/boilerplate/config/production/password deleted file mode 100644 index 81c2786f..00000000 --- a/boilerplate/config/production/password +++ /dev/null @@ -1 +0,0 @@ -prod_password diff --git a/boilerplate/config/testnet/password b/boilerplate/config/testnet/password new file mode 100644 index 00000000..414f8490 --- /dev/null +++ b/boilerplate/config/testnet/password @@ -0,0 +1 @@ +test_password diff --git a/demo/config/blockchain.json b/demo/config/blockchain.json index 94050ca9..ffa08980 100644 --- a/demo/config/blockchain.json +++ b/demo/config/blockchain.json @@ -15,11 +15,17 @@ }, "testnet": { "networkType": "testnet", + "light": true, "rpcHost": "localhost", - "rpcPort": 8545 + "rpcPort": 8545, + "rpcCorsDomain": "http://localhost:8000", + "account": { + "password": "config/testnet/password" + } }, "livenet": { "networkType": "livenet", + "light": true, "rpcHost": "localhost", "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", @@ -31,6 +37,7 @@ "networkType": "custom", "rpcHost": "localhost", "rpcPort": 8545, + "rpcCorsDomain": "http://localhost:8000", "datadir": "yourdatadir", "networkId": "123", "bootnodes": "" diff --git a/demo/config/testnet/password b/demo/config/testnet/password new file mode 100644 index 00000000..414f8490 --- /dev/null +++ b/demo/config/testnet/password @@ -0,0 +1 @@ +test_password diff --git a/lib/cmds/blockchain/geth_commands.js b/lib/cmds/blockchain/geth_commands.js index b84f1f44..bd3445c3 100644 --- a/lib/cmds/blockchain/geth_commands.js +++ b/lib/cmds/blockchain/geth_commands.js @@ -21,6 +21,14 @@ GethCommands.prototype.commonOptions = function() { cmd += "--datadir=\"" + config.datadir + "\" "; } + if (config.light) { + cmd += "--light "; + } + + if (config.fast) { + cmd += "--fast "; + } + if (config.account && config.account.password) { cmd += "--password " + config.account.password + " "; }