mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-23 20:07:16 +00:00
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()
|
||||
|
||||
// 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)
|
||||
|
Loading…
Reference in New Issue
Block a user