aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-05-08 22:37:35 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-05-08 22:37:35 +0800
commit57ba1824ac2f343ace4d9c38a654b3a03a2fee27 (patch)
tree64b28185d5860d92f437814761dcdcc42007e140
parentf821b0188a27bca08cada87c5b746ef9455a2e96 (diff)
parentd79f2f26569842121e6fafa9b3dbf48c2e589724 (diff)
downloadgo-tangerine-57ba1824ac2f343ace4d9c38a654b3a03a2fee27.tar
go-tangerine-57ba1824ac2f343ace4d9c38a654b3a03a2fee27.tar.gz
go-tangerine-57ba1824ac2f343ace4d9c38a654b3a03a2fee27.tar.bz2
go-tangerine-57ba1824ac2f343ace4d9c38a654b3a03a2fee27.tar.lz
go-tangerine-57ba1824ac2f343ace4d9c38a654b3a03a2fee27.tar.xz
go-tangerine-57ba1824ac2f343ace4d9c38a654b3a03a2fee27.tar.zst
go-tangerine-57ba1824ac2f343ace4d9c38a654b3a03a2fee27.zip
Merge pull request #2514 from bas-vk/startRPC_WS
node: start RPC/WS interface on localhost by default
-rw-r--r--node/api.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/node/api.go b/node/api.go
index f199a8d3d..9b2be9c2e 100644
--- a/node/api.go
+++ b/node/api.go
@@ -68,7 +68,11 @@ func (api *PrivateAdminAPI) StartRPC(host *string, port *rpc.HexNumber, cors *st
}
if host == nil {
- host = &api.node.httpHost
+ h := common.DefaultHTTPHost
+ if api.node.httpHost != "" {
+ h = api.node.httpHost
+ }
+ host = &h
}
if port == nil {
port = rpc.NewHexNumber(api.node.httpPort)
@@ -113,7 +117,11 @@ func (api *PrivateAdminAPI) StartWS(host *string, port *rpc.HexNumber, allowedOr
}
if host == nil {
- host = &api.node.wsHost
+ h := common.DefaultWSHost
+ if api.node.wsHost != "" {
+ h = api.node.wsHost
+ }
+ host = &h
}
if port == nil {
port = rpc.NewHexNumber(api.node.wsPort)