aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-06-30 00:09:01 +0800
committerGitHub <noreply@github.com>2017-06-30 00:09:01 +0800
commit41318f3776f3ecc09c2f482070bddc7433e00b14 (patch)
treeba33155b697da13a9585e97ce73a9d424dc9d432 /swarm/api
parent65b96dc4b95722df81d664d22fd06550a4c0b8a8 (diff)
parentf3359d5e585eef09648c7a06a6d3911704f61e73 (diff)
downloaddexon-41318f3776f3ecc09c2f482070bddc7433e00b14.tar
dexon-41318f3776f3ecc09c2f482070bddc7433e00b14.tar.gz
dexon-41318f3776f3ecc09c2f482070bddc7433e00b14.tar.bz2
dexon-41318f3776f3ecc09c2f482070bddc7433e00b14.tar.lz
dexon-41318f3776f3ecc09c2f482070bddc7433e00b14.tar.xz
dexon-41318f3776f3ecc09c2f482070bddc7433e00b14.tar.zst
dexon-41318f3776f3ecc09c2f482070bddc7433e00b14.zip
Merge pull request #14646 from ethersphere/swarm-ens-api
cmd/swarm: Support using Mainnet for resolving ENS names
Diffstat (limited to 'swarm/api')
-rw-r--r--swarm/api/config.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/swarm/api/config.go b/swarm/api/config.go
index 647c153ed..d8d25b1c8 100644
--- a/swarm/api/config.go
+++ b/swarm/api/config.go
@@ -25,6 +25,7 @@ import (
"path/filepath"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/contracts/ens"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/swarm/network"
"github.com/ethereum/go-ethereum/swarm/services/swap"
@@ -36,10 +37,6 @@ const (
DefaultHTTPPort = "8500"
)
-var (
- ensRootAddress = common.HexToAddress("0x112234455c3a32fd11230c42e7bccd4a84e02010")
-)
-
// separate bzz directories
// allow several bzz nodes running in parallel
type Config struct {
@@ -84,7 +81,7 @@ func NewConfig(path string, contract common.Address, prvKey *ecdsa.PrivateKey, n
Swap: swap.DefaultSwapParams(contract, prvKey),
PublicKey: pubkeyhex,
BzzKey: keyhex,
- EnsRoot: ensRootAddress,
+ EnsRoot: ens.TestNetAddress,
NetworkId: networkId,
}
data, err = ioutil.ReadFile(confpath)
@@ -129,7 +126,7 @@ func NewConfig(path string, contract common.Address, prvKey *ecdsa.PrivateKey, n
self.Swap.SetKey(prvKey)
if (self.EnsRoot == common.Address{}) {
- self.EnsRoot = ensRootAddress
+ self.EnsRoot = ens.TestNetAddress
}
return