aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/downloader/peer.go')
-rw-r--r--eth/downloader/peer.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go
index 7065ca105..bcb8ad43a 100644
--- a/eth/downloader/peer.go
+++ b/eth/downloader/peer.go
@@ -71,7 +71,7 @@ type peer struct {
td *big.Int
recentHash common.Hash
- requested *set.Set
+ ignored *set.Set
getHashes hashFetcherFn
getBlocks blockFetcherFn
@@ -86,7 +86,7 @@ func newPeer(id string, td *big.Int, hash common.Hash, getHashes hashFetcherFn,
getHashes: getHashes,
getBlocks: getBlocks,
state: idleState,
- requested: set.New(),
+ ignored: set.New(),
}
}
@@ -99,8 +99,6 @@ func (p *peer) fetch(chunk *chunk) error {
return errors.New("peer already fetching chunk")
}
- p.requested.Merge(chunk.hashes)
-
// set working state
p.state = workingState
// convert the set to a fetchable slice
@@ -137,5 +135,5 @@ func (p *peer) demote() {
func (p *peer) reset() {
p.state = idleState
- p.requested.Clear()
+ p.ignored.Clear()
}