Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dot/node) Start websocket server only with --ws flag #1671

Merged
merged 9 commits into from
Jul 6, 2021
2 changes: 1 addition & 1 deletion dot/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func NewNode(cfg *Config, ks *keystore.GlobalKeystore, stopFunc func()) (*Node,
nodeSrvcs = append(nodeSrvcs, sysSrvc)

// check if rpc service is enabled
if enabled := cfg.RPC.Enabled; enabled {
if enabled := cfg.RPC.Enabled || cfg.RPC.WS; enabled {
rpcSrvc := createRPCService(cfg, stateSrvc, coreSrvc, networkSrvc, bp, rt, sysSrvc)
nodeSrvcs = append(nodeSrvcs, rpcSrvc)
} else {
Expand Down