aboutsummaryrefslogtreecommitdiffstats
path: root/node/api.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-09-29 20:24:37 +0800
committerGitHub <noreply@github.com>2016-09-29 20:24:37 +0800
commit44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308 (patch)
treeaaab07e78f7b9341f0fcfbd9348fe96273bd6a0d /node/api.go
parent4e8cec05abb567457e80185cb9fcf7ec2cc90596 (diff)
parentb42a5b118f1aa7ac1235547c8594146978941401 (diff)
downloaddexon-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar
dexon-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.gz
dexon-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.bz2
dexon-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.lz
dexon-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.xz
dexon-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.zst
dexon-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.zip
Merge pull request #2914 from fjl/node-coinhabit
cmd/utils, node: make datadir reusable for bzzd
Diffstat (limited to 'node/api.go')
-rw-r--r--node/api.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/node/api.go b/node/api.go
index 3523874ab..631e92c8e 100644
--- a/node/api.go
+++ b/node/api.go
@@ -84,17 +84,17 @@ func (api *PrivateAdminAPI) StartRPC(host *string, port *rpc.HexNumber, cors *st
}
if host == nil {
- h := common.DefaultHTTPHost
- if api.node.httpHost != "" {
- h = api.node.httpHost
+ h := DefaultHTTPHost
+ if api.node.config.HTTPHost != "" {
+ h = api.node.config.HTTPHost
}
host = &h
}
if port == nil {
- port = rpc.NewHexNumber(api.node.httpPort)
+ port = rpc.NewHexNumber(api.node.config.HTTPPort)
}
if cors == nil {
- cors = &api.node.httpCors
+ cors = &api.node.config.HTTPCors
}
modules := api.node.httpWhitelist
@@ -133,20 +133,20 @@ func (api *PrivateAdminAPI) StartWS(host *string, port *rpc.HexNumber, allowedOr
}
if host == nil {
- h := common.DefaultWSHost
- if api.node.wsHost != "" {
- h = api.node.wsHost
+ h := DefaultWSHost
+ if api.node.config.WSHost != "" {
+ h = api.node.config.WSHost
}
host = &h
}
if port == nil {
- port = rpc.NewHexNumber(api.node.wsPort)
+ port = rpc.NewHexNumber(api.node.config.WSPort)
}
if allowedOrigins == nil {
- allowedOrigins = &api.node.wsOrigins
+ allowedOrigins = &api.node.config.WSOrigins
}
- modules := api.node.wsWhitelist
+ modules := api.node.config.WSModules
if apis != nil {
modules = nil
for _, m := range strings.Split(*apis, ",") {