aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorDaniel A. Nagy <nagy.da@gmail.com>2015-05-08 23:55:53 +0800
committerDaniel A. Nagy <nagy.da@gmail.com>2015-05-08 23:55:53 +0800
commit62dd9833ec768e2026bccb1cf7a8ef4263b9286d (patch)
tree0a091d99afd7f8cf5e3a6d4522c30ceef8559a55 /eth/handler.go
parent3a01e3e39b9ce83ecb7444319407ee8bb00e3bf6 (diff)
parentc8fc4cebe63073fd77d5f553a4f0cec36a4ccb4b (diff)
downloaddexon-62dd9833ec768e2026bccb1cf7a8ef4263b9286d.tar
dexon-62dd9833ec768e2026bccb1cf7a8ef4263b9286d.tar.gz
dexon-62dd9833ec768e2026bccb1cf7a8ef4263b9286d.tar.bz2
dexon-62dd9833ec768e2026bccb1cf7a8ef4263b9286d.tar.lz
dexon-62dd9833ec768e2026bccb1cf7a8ef4263b9286d.tar.xz
dexon-62dd9833ec768e2026bccb1cf7a8ef4263b9286d.tar.zst
dexon-62dd9833ec768e2026bccb1cf7a8ef4263b9286d.zip
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
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 1e0663816..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
)
@@ -307,7 +307,7 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
// Attempt to insert the newly received by checking if the parent exists.
// if the parent exists we process the block and propagate to our peers
- // otherwise synchronise with the peer
+ // otherwise synchronize with the peer
if self.chainman.HasBlock(request.Block.ParentHash()) {
if _, err := self.chainman.InsertChain(types.Blocks{request.Block}); err != nil {
glog.V(logger.Error).Infoln("removed peer (", p.id, ") due to block error")