diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-27 08:07:03 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-27 08:07:03 +0800 |
commit | 70867904a0255bd044851585a9ad2dc34391ced2 (patch) | |
tree | 9c5dfc6a9b8944c37f874a81cc9f8fd3d697ad4e /eth/backend.go | |
parent | ceea1a7051ddc7d2660117204aeb3392b7cf8314 (diff) | |
parent | 2c532a7255919bc09e01cca6866bfc15682509a3 (diff) | |
download | go-tangerine-70867904a0255bd044851585a9ad2dc34391ced2.tar go-tangerine-70867904a0255bd044851585a9ad2dc34391ced2.tar.gz go-tangerine-70867904a0255bd044851585a9ad2dc34391ced2.tar.bz2 go-tangerine-70867904a0255bd044851585a9ad2dc34391ced2.tar.lz go-tangerine-70867904a0255bd044851585a9ad2dc34391ced2.tar.xz go-tangerine-70867904a0255bd044851585a9ad2dc34391ced2.tar.zst go-tangerine-70867904a0255bd044851585a9ad2dc34391ced2.zip |
Merge branch 'release/0.9.25'v0.9.25
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/eth/backend.go b/eth/backend.go index aeaac788a..18e214d44 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -72,6 +72,7 @@ type Config struct { MaxPeers int MaxPendingPeers int + Discovery bool Port string // Space-separated list of discovery node URLs @@ -311,6 +312,7 @@ func New(config *Config) (*Ethereum, error) { Name: config.Name, MaxPeers: config.MaxPeers, MaxPendingPeers: config.MaxPendingPeers, + Discovery: config.Discovery, Protocols: protocols, NAT: config.NAT, NoDial: !config.Dial, @@ -449,14 +451,10 @@ func (s *Ethereum) Start() error { ClientString: s.net.Name, ProtocolVersion: ProtocolVersion, }) - - if s.net.MaxPeers > 0 { - err := s.net.Start() - if err != nil { - return err - } + err := s.net.Start() + if err != nil { + return err } - // periodically flush databases go s.syncDatabases() |