aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/api/config.go')
-rw-r--r--swarm/api/config.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/swarm/api/config.go b/swarm/api/config.go
index 23a855500..647c153ed 100644
--- a/swarm/api/config.go
+++ b/swarm/api/config.go
@@ -32,7 +32,8 @@ import (
)
const (
- port = "8500"
+ DefaultHTTPListenAddr = "127.0.0.1"
+ DefaultHTTPPort = "8500"
)
var (
@@ -48,12 +49,13 @@ type Config struct {
*network.HiveParams
Swap *swap.SwapParams
*network.SyncParams
- Path string
- Port string
- PublicKey string
- BzzKey string
- EnsRoot common.Address
- NetworkId uint64
+ Path string
+ ListenAddr string
+ Port string
+ PublicKey string
+ BzzKey string
+ EnsRoot common.Address
+ NetworkId uint64
}
// config is agnostic to where private key is coming from
@@ -76,7 +78,8 @@ func NewConfig(path string, contract common.Address, prvKey *ecdsa.PrivateKey, n
HiveParams: network.NewHiveParams(dirpath),
ChunkerParams: storage.NewChunkerParams(),
StoreParams: storage.NewStoreParams(dirpath),
- Port: port,
+ ListenAddr: DefaultHTTPListenAddr,
+ Port: DefaultHTTPPort,
Path: dirpath,
Swap: swap.DefaultSwapParams(contract, prvKey),
PublicKey: pubkeyhex,