mirror of https://github.com/status-im/op-geth.git
eth/fetcher: don't double filter/fetch the same block
This commit is contained in:
parent
a0191910fc
commit
29d53b2073
|
@ -323,7 +323,7 @@ func (f *Fetcher) loop() {
|
||||||
hash := block.Hash()
|
hash := block.Hash()
|
||||||
|
|
||||||
// Filter explicitly requested blocks from hash announcements
|
// 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
|
// Discard if already imported by other means
|
||||||
if f.getBlock(hash) == nil {
|
if f.getBlock(hash) == nil {
|
||||||
explicit = append(explicit, block)
|
explicit = append(explicit, block)
|
||||||
|
|
Loading…
Reference in New Issue