mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-02 13:08:41 +00:00
a
This commit is contained in:
parent
63a060d8ed
commit
5878883bdb
2 changed files with 5 additions and 0 deletions
|
|
@ -90,6 +90,10 @@ func New(conf *Config) (*Node, error) {
|
||||||
conf.Logger = log.New()
|
conf.Logger = log.New()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if conf.HTTPProto == "" {
|
||||||
|
conf.HTTPProto = "tcp4"
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure that the instance name doesn't cause weird conflicts with
|
// Ensure that the instance name doesn't cause weird conflicts with
|
||||||
// other files in the data directory.
|
// other files in the data directory.
|
||||||
if strings.ContainsAny(conf.Name, `/\`) {
|
if strings.ContainsAny(conf.Name, `/\`) {
|
||||||
|
|
|
||||||
|
|
@ -531,6 +531,7 @@ func TestNodeRPCPrefix(t *testing.T) {
|
||||||
name := fmt.Sprintf("http=%s ws=%s", test.httpPrefix, test.wsPrefix)
|
name := fmt.Sprintf("http=%s ws=%s", test.httpPrefix, test.wsPrefix)
|
||||||
t.Run(name, func(t *testing.T) {
|
t.Run(name, func(t *testing.T) {
|
||||||
cfg := &Config{
|
cfg := &Config{
|
||||||
|
HTTPProto: "tcp",
|
||||||
HTTPHost: "127.0.0.1",
|
HTTPHost: "127.0.0.1",
|
||||||
HTTPPathPrefix: test.httpPrefix,
|
HTTPPathPrefix: test.httpPrefix,
|
||||||
WSHost: "127.0.0.1",
|
WSHost: "127.0.0.1",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue