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

node: allow WebSocket and HTTP works on the same port #729

Merged
merged 11 commits into from
Nov 13, 2024
4 changes: 2 additions & 2 deletions cmd/XDC/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func defaultNodeConfig() node.Config {
cfg := node.DefaultConfig
cfg.Name = clientIdentifier
cfg.Version = params.VersionWithCommit(gitCommit)
cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh")
cfg.WSModules = append(cfg.WSModules, "eth", "shh")
cfg.HTTPModules = append(cfg.HTTPModules, "eth")
cfg.WSModules = append(cfg.WSModules, "eth")
cfg.IPCPath = "XDC.ipc"
return cfg
}
Expand Down
351 changes: 0 additions & 351 deletions cmd/XDC/monitorcmd.go

This file was deleted.

13 changes: 8 additions & 5 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,15 @@ func setNAT(ctx *cli.Context, cfg *p2p.Config) {

// splitAndTrim splits input separated by a comma
// and trims excessive white space from the substrings.
func splitAndTrim(input string) []string {
result := strings.Split(input, ",")
for i, r := range result {
result[i] = strings.TrimSpace(r)
func splitAndTrim(input string) (ret []string) {
l := strings.Split(input, ",")
for _, r := range l {
r = strings.TrimSpace(r)
if len(r) > 0 {
ret = append(ret, r)
}
}
return result
return ret
}

// setHTTP creates the HTTP RPC listener interface string from the set
Expand Down
Loading