diff options
author | Felix Lange <fjl@twurst.com> | 2015-05-27 04:03:11 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-05-27 04:03:11 +0800 |
commit | 6a674ffea506aeb9962bb22bc0dbe0d5df72043b (patch) | |
tree | d56078ad4a64e5bf970bb5dabd4ec9483c9b72e6 /eth | |
parent | b1f7b5d1f60521cd700c08ae2985518cd36fc627 (diff) | |
parent | 4de8213887b26b13d18fc6da6ce159e60ddae6fa (diff) | |
download | dexon-6a674ffea506aeb9962bb22bc0dbe0d5df72043b.tar.gz dexon-6a674ffea506aeb9962bb22bc0dbe0d5df72043b.tar.zst dexon-6a674ffea506aeb9962bb22bc0dbe0d5df72043b.zip |
Merge pull request #1108 from karalabe/fine-seeding
Fine tune seeder and p2p peer handling
Diffstat (limited to 'eth')
-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() |