[ethereum/go-ethereum] les: implement ulc (#16904)

zsfelfoldi commented on this pull request.

> // check for potential timed out block delay statistics
f.checkUpdateStats(p, nil)
+
+ f.lock.Lock()

I know that you had a data race, that’s not what I’m asking. Here you swapped the order of `f.checkUpdateStats(p, nil)` and `f.lock.Lock()` which is clearly wrong because checkUpdateStats was meant to be called while the main fetcher lock is held. Why did you do that? To me it looks like this is the CAUSE of the data race, not a solution to it.

Добавить комментарий