From 278183c7e727f875fb2eae8ceba29bfd4b01afc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 26 May 2015 17:49:37 +0300 Subject: eth, p2p: start the p2p server even if maxpeers == 0 --- eth/backend.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'eth/backend.go') diff --git a/eth/backend.go b/eth/backend.go index aeaac788a..73d37c536 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -449,14 +449,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() -- cgit v1.2.3 From e1a0ee8fc541bd73ac5d5a0cdacfe5265fcef833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 26 May 2015 19:07:24 +0300 Subject: cmd/geth, cmd/utils, eth, p2p: pass and honor a no discovery flag --- eth/backend.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'eth/backend.go') diff --git a/eth/backend.go b/eth/backend.go index 73d37c536..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, -- cgit v1.2.3