aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-05-27 04:03:11 +0800
committerFelix Lange <fjl@twurst.com>2015-05-27 04:03:11 +0800
commit6a674ffea506aeb9962bb22bc0dbe0d5df72043b (patch)
treed56078ad4a64e5bf970bb5dabd4ec9483c9b72e6 /eth
parentb1f7b5d1f60521cd700c08ae2985518cd36fc627 (diff)
parent4de8213887b26b13d18fc6da6ce159e60ddae6fa (diff)
downloaddexon-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.go12
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()