aboutsummaryrefslogtreecommitdiffstats
path: root/eth/peer.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/peer.go
parent11f65cf885317d6c355b4c4a8d7420bcb82839d1 (diff)
parent4ed3509a02c7f5a09036e6e9cb615c6def6d25f3 (diff)
downloaddexon-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar.gz
dexon-087949227c3b10c2ae45cb1a54a6de1f4f5d6600.tar.zst
dexon-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/peer.go')
-rw-r--r--eth/peer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/eth/peer.go b/eth/peer.go
index bb6a20349..b2fa20ebb 100644
--- a/eth/peer.go
+++ b/eth/peer.go
@@ -102,7 +102,7 @@ func (p *peer) sendTransaction(tx *types.Transaction) error {
func (p *peer) requestHashes(from common.Hash) error {
glog.V(logger.Debug).Infof("[%s] fetching hashes (%d) %x...\n", p.id, downloader.MaxHashFetch, from[:4])
- return p2p.Send(p.rw, GetBlockHashesMsg, getBlockHashesMsgData{from, downloader.MaxHashFetch})
+ return p2p.Send(p.rw, GetBlockHashesMsg, getBlockHashesMsgData{from, uint64(downloader.MaxHashFetch)})
}
func (p *peer) requestBlocks(hashes []common.Hash) error {