aboutsummaryrefslogtreecommitdiffstats
path: root/eth/peer.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-22 00:00:12 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-22 00:00:12 +0800
commitaf28736bd0f01176fa95b715e48476dd8269b942 (patch)
treeeb7d7a47801f5650ae790735f5b48c657ccc7f4c /eth/peer.go
parent1da145675d7975bf99ef0c947cac7eaf5b87f21d (diff)
parent06a041589f3c2d4b3e66a1ce51e3e03e209fdbff (diff)
downloadgo-tangerine-af28736bd0f01176fa95b715e48476dd8269b942.tar.gz
go-tangerine-af28736bd0f01176fa95b715e48476dd8269b942.tar.zst
go-tangerine-af28736bd0f01176fa95b715e48476dd8269b942.zip
Merge pull request #1064 from karalabe/downloader-attacks
Fix two additional download vulnerabilities
Diffstat (limited to 'eth/peer.go')
-rw-r--r--eth/peer.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/peer.go b/eth/peer.go
index fdd815293..bb6a20349 100644
--- a/eth/peer.go
+++ b/eth/peer.go
@@ -8,6 +8,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/eth/downloader"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/p2p"
@@ -100,8 +101,8 @@ 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, maxHashes, from[:4])
- return p2p.Send(p.rw, GetBlockHashesMsg, getBlockHashesMsgData{from, maxHashes})
+ 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})
}
func (p *peer) requestBlocks(hashes []common.Hash) error {