eth/fetcher: ignore block notification if already under fetching process

This commit is contained in:
Miya Chen 2017-08-09 16:41:14 +08:00
parent 6ca59d98f8
commit 66ee63f727

View file

@ -338,9 +338,15 @@ func (f *Fetcher) loop() {
if _, ok := f.fetching[notification.hash]; ok {
break
}
if _, ok := f.fetched[notification.hash]; ok {
break
}
if _, ok := f.completing[notification.hash]; ok {
break
}
if _, ok := f.queued[notification.hash]; ok {
break
}
f.announces[notification.origin] = count
f.announced[notification.hash] = append(f.announced[notification.hash], notification)
if f.announceChangeHook != nil && len(f.announced[notification.hash]) == 1 {