aboutsummaryrefslogtreecommitdiffstats
path: root/eth/fetcher
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-29 18:49:04 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-29 18:49:04 +0800
commit29d53b20739645eb6ecab3ef79ecf3518eae6b68 (patch)
tree8782994e1a4577abac2fb31171f78c29a347d324 /eth/fetcher
parenta0191910fcc7f4122c90db49f8381e4d3bd58823 (diff)
downloaddexon-29d53b20739645eb6ecab3ef79ecf3518eae6b68.tar
dexon-29d53b20739645eb6ecab3ef79ecf3518eae6b68.tar.gz
dexon-29d53b20739645eb6ecab3ef79ecf3518eae6b68.tar.bz2
dexon-29d53b20739645eb6ecab3ef79ecf3518eae6b68.tar.lz
dexon-29d53b20739645eb6ecab3ef79ecf3518eae6b68.tar.xz
dexon-29d53b20739645eb6ecab3ef79ecf3518eae6b68.tar.zst
dexon-29d53b20739645eb6ecab3ef79ecf3518eae6b68.zip
eth/fetcher: don't double filter/fetch the same block
Diffstat (limited to 'eth/fetcher')
-rw-r--r--eth/fetcher/fetcher.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go
index 07a32b9f1..69f3cb5d1 100644
--- a/eth/fetcher/fetcher.go
+++ b/eth/fetcher/fetcher.go
@@ -323,7 +323,7 @@ func (f *Fetcher) loop() {
hash := block.Hash()
// Filter explicitly requested blocks from hash announcements
- if _, ok := f.fetching[hash]; ok {
+ if f.fetching[hash] != nil && f.queued[hash] == nil {
// Discard if already imported by other means
if f.getBlock(hash) == nil {
explicit = append(explicit, block)