diff options
author | lash <nolash@users.noreply.github.com> | 2019-03-22 12:55:47 +0800 |
---|---|---|
committer | Viktor TrĂ³n <viktor.tron@gmail.com> | 2019-03-22 12:55:47 +0800 |
commit | 09924cbcaab5106951fb67648315131bb4024ac5 (patch) | |
tree | efeb2e96b97b6537ce5680a26934176567da00b3 /swarm/swarm.go | |
parent | 358535188852bd9d8e351ccbb0d1fa608284a77b (diff) | |
download | go-tangerine-09924cbcaab5106951fb67648315131bb4024ac5.tar go-tangerine-09924cbcaab5106951fb67648315131bb4024ac5.tar.gz go-tangerine-09924cbcaab5106951fb67648315131bb4024ac5.tar.bz2 go-tangerine-09924cbcaab5106951fb67648315131bb4024ac5.tar.lz go-tangerine-09924cbcaab5106951fb67648315131bb4024ac5.tar.xz go-tangerine-09924cbcaab5106951fb67648315131bb4024ac5.tar.zst go-tangerine-09924cbcaab5106951fb67648315131bb4024ac5.zip |
cmd/swarm, p2p, swarm: Enable ENR in binary/execadapter (#19309)
* cmd/swarm, p2p, swarm: Enable ENR in binary/execadapter
* cmd/p2p/swarm: Remove comments + config.Enode nomarshal
* p2p/simulations: Remove superfluous error check
* p2p/simulation: Move init enode comment
* swarm/api: Check error in config test
* swarm, p2p/simulations, cmd/swarm: Use nodekey in binary record sign
* cmd/swarm: Make nodekey available for swarm api config
Diffstat (limited to 'swarm/swarm.go')
-rw-r--r-- | swarm/swarm.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/swarm/swarm.go b/swarm/swarm.go index ae78ccd48..61813e23f 100644 --- a/swarm/swarm.go +++ b/swarm/swarm.go @@ -36,7 +36,6 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/protocols" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" @@ -171,10 +170,7 @@ func NewSwarm(config *api.Config, mockStore *mock.NodeStore) (self *Swarm, err e self.accountingMetrics = protocols.SetupAccountingMetrics(10*time.Second, filepath.Join(config.Path, "metrics.db")) } - var nodeID enode.ID - if err := nodeID.UnmarshalText([]byte(config.NodeID)); err != nil { - return nil, err - } + nodeID := config.Enode.ID() syncing := stream.SyncingAutoSubscribe if !config.SyncEnabled || config.LightNodeEnabled { |