mirror of https://github.com/embarklabs/embark.git
extract method for determing rpc options
This commit is contained in:
parent
b29f23e28c
commit
87ff194ce4
|
@ -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 ";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue