diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-21 23:16:04 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-21 23:16:04 +0800 |
commit | 06a041589f3c2d4b3e66a1ce51e3e03e209fdbff (patch) | |
tree | 2c6d15f5ac83fcf642b3c8432da19e937534f5f1 /eth/handler.go | |
parent | 52db6d8be577669bd5ba659ac223acf61956b05a (diff) | |
download | go-tangerine-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar go-tangerine-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar.gz go-tangerine-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar.bz2 go-tangerine-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar.lz go-tangerine-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar.xz go-tangerine-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar.zst go-tangerine-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.zip |
eth, eth/downloader: remove duplicate consts, bump hash fetch to 2K
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/handler.go b/eth/handler.go index 835097d84..63b1d50f6 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -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 } } |