aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-05-08 20:22:48 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-05-08 20:22:48 +0800
commitbd5720f4804788d91154a10ef5bb10425c502658 (patch)
treed8914c112f86404314060e6d04029fe212c50ac0 /eth/handler.go
parent9d188f73b58ee1fe4bda00a9536bda4056755f2c (diff)
downloaddexon-bd5720f4804788d91154a10ef5bb10425c502658.tar
dexon-bd5720f4804788d91154a10ef5bb10425c502658.tar.gz
dexon-bd5720f4804788d91154a10ef5bb10425c502658.tar.bz2
dexon-bd5720f4804788d91154a10ef5bb10425c502658.tar.lz
dexon-bd5720f4804788d91154a10ef5bb10425c502658.tar.xz
dexon-bd5720f4804788d91154a10ef5bb10425c502658.tar.zst
dexon-bd5720f4804788d91154a10ef5bb10425c502658.zip
eth, eth/downloader: handle sync errors a bit more gracefully
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/handler.go b/eth/handler.go
index b2018f336..41b6728d9 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -19,9 +19,9 @@ import (
)
const (
- peerCountTimeout = 12 * time.Second // Amount of time it takes for the peer handler to ignore minDesiredPeerCount
- blockProcTimer = 500 * time.Millisecond
- minDesiredPeerCount = 5 // Amount of peers desired to start syncing
+ forceSyncCycle = 10 * time.Second // Time interval to force syncs, even if few peers are available
+ blockProcCycle = 500 * time.Millisecond // Time interval to check for new blocks to process
+ minDesiredPeerCount = 5 // Amount of peers desired to start syncing
blockProcAmount = 256
)
@@ -324,7 +324,7 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
}
self.BroadcastBlock(hash, request.Block)
} else {
- go self.synchronize(p)
+ go self.synchronise(p)
}
default:
return errResp(ErrInvalidMsgCode, "%v", msg.Code)