diff --git a/lib/cmds/blockchain/geth_commands.js b/lib/cmds/blockchain/geth_commands.js index 02e2ab76..4f2964c7 100644 --- a/lib/cmds/blockchain/geth_commands.js +++ b/lib/cmds/blockchain/geth_commands.js @@ -63,12 +63,8 @@ GethCommands.prototype.listAccountsCommand = function() { return this.geth_bin + " " + this.commonOptions() + "account list "; }; -GethCommands.prototype.mainCommand = function(address) { - var config = this.config; - var cmd = this.geth_bin + " "; - var rpc_api = (this.config.rpcApi || ['eth', 'web3', 'net']); - - cmd += this.commonOptions(); +GethCommands.prototype.determineRpcOptions = function(config) { + var cmd = ""; cmd += "--port " + config.port + " "; cmd += "--rpc "; @@ -87,6 +83,18 @@ GethCommands.prototype.mainCommand = function(address) { console.log('=================================='); } + return cmd; +}; + +GethCommands.prototype.mainCommand = function(address) { + var config = this.config; + var cmd = this.geth_bin + " "; + var rpc_api = (this.config.rpcApi || ['eth', 'web3', 'net']); + + cmd += this.commonOptions(); + + cmd += this.determineRpcOptions(this.config); + if (config.nodiscover) { cmd += "--nodiscover "; }