aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-08 19:06:36 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-08 19:12:00 +0800
commit63c6cedb14cbd461733e33ffac016dc7d8e431ae (patch)
treea1593178989ed92561b37dceb90fbf7401af4b10 /eth/handler.go
parent4b2dd44711a04c639ecde68806455ccf7244acce (diff)
downloaddexon-63c6cedb14cbd461733e33ffac016dc7d8e431ae.tar
dexon-63c6cedb14cbd461733e33ffac016dc7d8e431ae.tar.gz
dexon-63c6cedb14cbd461733e33ffac016dc7d8e431ae.tar.bz2
dexon-63c6cedb14cbd461733e33ffac016dc7d8e431ae.tar.lz
dexon-63c6cedb14cbd461733e33ffac016dc7d8e431ae.tar.xz
dexon-63c6cedb14cbd461733e33ffac016dc7d8e431ae.tar.zst
dexon-63c6cedb14cbd461733e33ffac016dc7d8e431ae.zip
eth/downloader: cap the hash ban set, add test for it
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go
index aea33452c..37bbd3691 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -213,8 +213,8 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
return errResp(ErrDecode, "->msg %v: %v", msg, err)
}
- if request.Amount > downloader.MaxHashFetch {
- request.Amount = downloader.MaxHashFetch
+ if request.Amount > uint64(downloader.MaxHashFetch) {
+ request.Amount = uint64(downloader.MaxHashFetch)
}
hashes := self.chainman.GetBlockHashesFromHash(request.Hash, request.Amount)