eth, eth/downloader: remove duplicate consts, bump hash fetch to 2K

This commit is contained in:
Péter Szilágyi
2015-05-21 18:16:04 +03:00
parent 52db6d8be5
commit 06a041589f
6 changed files with 14 additions and 13 deletions

View File

@ -206,8 +206,8 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
return errResp(ErrDecode, "->msg %v: %v", msg, err)
}
if request.Amount > maxHashes {
request.Amount = maxHashes
if request.Amount > downloader.MaxHashFetch {
request.Amount = downloader.MaxHashFetch
}
hashes := self.chainman.GetBlockHashesFromHash(request.Hash, request.Amount)
@ -254,7 +254,7 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
if block != nil {
blocks = append(blocks, block)
}
if i == maxBlocks {
if i == downloader.MaxBlockFetch {
break
}
}