Add websocket config to CLI

This commit is contained in:
Paul Hauner
2019-09-14 22:57:46 -04:00
parent da26341011
commit 9c5eded1ab
6 changed files with 74 additions and 21 deletions

View File

@@ -552,6 +552,7 @@ impl ConfigBuilder {
self.client_config.network.discovery_port += bump;
self.client_config.rpc.port += bump;
self.client_config.rest_api.port += bump;
self.client_config.websocket_server.port += bump;
}
if self.eth2_config.spec_constants != self.client_config.spec_constants {

View File

@@ -147,7 +147,7 @@ fn main() {
.conflicts_with("port-bump")
.takes_value(true),
)
/* Client related arguments */
/* REST API related arguments */
.arg(
Arg::with_name("no-api")
.long("no-api")
@@ -169,6 +169,29 @@ fn main() {
.conflicts_with("port-bump")
.takes_value(true),
)
/* Websocket related arguments */
.arg(
Arg::with_name("no-ws")
.long("no-ws")
.help("Disable websocket server.")
.takes_value(false),
)
.arg(
Arg::with_name("ws-address")
.long("ws-address")
.value_name("ADDRESS")
.help("Set the listen address for the websocket server.")
.conflicts_with_all(&["no-ws"])
.takes_value(true),
)
.arg(
Arg::with_name("ws-port")
.long("ws-port")
.value_name("PORT")
.help("Set the listen TCP port for the websocket server.")
.conflicts_with_all(&["no-ws", "port-bump"])
.takes_value(true),
)
/*
* Eth1 Integration