aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-06-09 18:45:41 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-06-09 18:45:41 +0800
commit087949227c3b10c2ae45cb1a54a6de1f4f5d6600 (patch)
treee9833af8a79a73d50c4142a4d9b4a5a54d990376 /eth/handler.go
parent11f65cf885317d6c355b4c4a8d7420bcb82839d1 (diff)
parent4ed3509a02c7f5a09036e6e9cb615c6def6d25f3 (diff)
downloadgo-tangerine-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar
go-tangerine-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar.gz
go-tangerine-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar.bz2
go-tangerine-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar.lz
go-tangerine-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar.xz
go-tangerine-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar.zst
go-tangerine-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.zip
Merge pull request #1153 from karalabe/downloader-banned-starvation-attack
eth/downloader: gather and ban hashes from invalid chains
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)