aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go12
-rw-r--r--eth/downloader/downloader.go2
-rw-r--r--eth/sync.go1
3 files changed, 6 insertions, 9 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()
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 0634baaed..421c336f2 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -415,7 +415,7 @@ out:
peer.Demote()
break
}
- if glog.V(logger.Debug) {
+ if glog.V(logger.Debug) && len(blockPack.blocks) > 0 {
glog.Infof("Added %d blocks from: %s\n", len(blockPack.blocks), blockPack.peerId)
}
// Promote the peer and update it's idle state
diff --git a/eth/sync.go b/eth/sync.go
index d93f83a78..cf549f852 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -70,7 +70,6 @@ func (pm *ProtocolManager) processBlocks() error {
// Try to inset the blocks, drop the originating peer if there's an error
index, err := pm.chainman.InsertChain(raw)
if err != nil {
- glog.V(logger.Warn).Infof("Block insertion failed: %v", err)
pm.removePeer(blocks[index].OriginPeer)
pm.downloader.Cancel()
return err