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 ";
|
return this.geth_bin + " " + this.commonOptions() + "account list ";
|
||||||
};
|
};
|
||||||
|
|
||||||
GethCommands.prototype.mainCommand = function(address) {
|
GethCommands.prototype.determineRpcOptions = function(config) {
|
||||||
var config = this.config;
|
var cmd = "";
|
||||||
var cmd = this.geth_bin + " ";
|
|
||||||
var rpc_api = (this.config.rpcApi || ['eth', 'web3', 'net']);
|
|
||||||
|
|
||||||
cmd += this.commonOptions();
|
|
||||||
|
|
||||||
cmd += "--port " + config.port + " ";
|
cmd += "--port " + config.port + " ";
|
||||||
cmd += "--rpc ";
|
cmd += "--rpc ";
|
||||||
|
@ -87,6 +83,18 @@ GethCommands.prototype.mainCommand = function(address) {
|
||||||
console.log('==================================');
|
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) {
|
if (config.nodiscover) {
|
||||||
cmd += "--nodiscover ";
|
cmd += "--nodiscover ";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue