diff --git a/node/node.go b/node/node.go index 12da410534..473a1d5b6a 100644 --- a/node/node.go +++ b/node/node.go @@ -90,6 +90,10 @@ func New(conf *Config) (*Node, error) { conf.Logger = log.New() } + if conf.HTTPProto == "" { + conf.HTTPProto = "tcp4" + } + // Ensure that the instance name doesn't cause weird conflicts with // other files in the data directory. if strings.ContainsAny(conf.Name, `/\`) { diff --git a/node/node_test.go b/node/node_test.go index 560d487fa8..dae11f9973 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -531,6 +531,7 @@ func TestNodeRPCPrefix(t *testing.T) { name := fmt.Sprintf("http=%s ws=%s", test.httpPrefix, test.wsPrefix) t.Run(name, func(t *testing.T) { cfg := &Config{ + HTTPProto: "tcp", HTTPHost: "127.0.0.1", HTTPPathPrefix: test.httpPrefix, WSHost: "127.0.0.1",