aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/swarm.go
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/swarm.go
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/swarm.go')
-rw-r--r--swarm/swarm.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/swarm/swarm.go b/swarm/swarm.go
index 4f93a30b7..830490843 100644
--- a/swarm/swarm.go
+++ b/swarm/swarm.go
@@ -76,7 +76,7 @@ func (self *Swarm) API() *SwarmAPI {
// creates a new swarm service instance
// implements node.Service
-func NewSwarm(ctx *node.ServiceContext, backend chequebook.Backend, config *api.Config, swapEnabled, syncEnabled bool, cors string) (self *Swarm, err error) {
+func NewSwarm(ctx *node.ServiceContext, backend chequebook.Backend, ensClient *ethclient.Client, config *api.Config, swapEnabled, syncEnabled bool, cors string) (self *Swarm, err error) {
if bytes.Equal(common.FromHex(config.PublicKey), storage.ZeroKey) {
return nil, fmt.Errorf("empty public key")
}
@@ -136,10 +136,10 @@ func NewSwarm(ctx *node.ServiceContext, backend chequebook.Backend, config *api.
// set up high level api
transactOpts := bind.NewKeyedTransactor(self.privateKey)
- if backend == (*ethclient.Client)(nil) {
- log.Warn("No ENS, please specify non-empty --ethapi to use domain name resolution")
+ if ensClient == nil {
+ log.Warn("No ENS, please specify non-empty --ens-api to use domain name resolution")
} else {
- self.dns, err = ens.NewENS(transactOpts, config.EnsRoot, self.backend)
+ self.dns, err = ens.NewENS(transactOpts, config.EnsRoot, ensClient)
if err != nil {
return nil, err
}