diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-08 23:19:53 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-08 23:19:53 +0800 |
commit | 0214cbe0fb01e623a905a6ff8875896f78e00840 (patch) | |
tree | 0b9227ca5be01d6b667dd2651771b08d8f75499d /eth/handler.go | |
parent | 7c678554b585b70d5498442bc7122e3091ace80f (diff) | |
parent | edad47bf0e68ad02ee0cb6efd776c9f9be67ad8e (diff) | |
download | dexon-0214cbe0fb01e623a905a6ff8875896f78e00840.tar dexon-0214cbe0fb01e623a905a6ff8875896f78e00840.tar.gz dexon-0214cbe0fb01e623a905a6ff8875896f78e00840.tar.bz2 dexon-0214cbe0fb01e623a905a6ff8875896f78e00840.tar.lz dexon-0214cbe0fb01e623a905a6ff8875896f78e00840.tar.xz dexon-0214cbe0fb01e623a905a6ff8875896f78e00840.tar.zst dexon-0214cbe0fb01e623a905a6ff8875896f78e00840.zip |
Merge pull request #863 from karalabe/ordered-block-download
eth/downloader: prioritize block fetch based on chain position, cap memo...
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 8 |
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") |