aboutsummaryrefslogtreecommitdiffstats
path: root/eth/peer.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-05-21 23:16:04 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-05-21 23:16:04 +0800
commit06a041589f3c2d4b3e66a1ce51e3e03e209fdbff (patch)
tree2c6d15f5ac83fcf642b3c8432da19e937534f5f1 /eth/peer.go
parent52db6d8be577669bd5ba659ac223acf61956b05a (diff)
downloaddexon-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar.gz
dexon-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.tar.zst
dexon-06a041589f3c2d4b3e66a1ce51e3e03e209fdbff.zip
eth, eth/downloader: remove duplicate consts, bump hash fetch to 2K
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 a23449acd..1ef032d38 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 {