plugeth/eth/downloader
Marius van der Wijden d671dbd5b7
eth/downloader: fixes data race between synchronize and other methods (#21201)
* eth/downloaded: fixed datarace between synchronize and Progress

There was a race condition between `downloader.synchronize()` and `Progress` `syncWithPeer` `fetchHeight` `findAncestors` and `processHeaders`
This PR changes the behavior of the downloader a bit.
Previously the functions `Progress` `syncWithPeer` `fetchHeight` `findAncestors` and `processHeaders` read the syncMode anew within their loops. Now they read the syncMode at the start of their function and don't change it during their runtime.

* eth/downloaded: comment

* eth/downloader: added comment
2020-06-30 19:43:29 +02:00
..
api.go core, eth: fix goimports for Go 1.11 2018-09-19 11:47:09 +03:00
downloader_test.go eth/downloader: fixes data race between synchronize and other methods (#21201) 2020-06-30 19:43:29 +02:00
downloader.go eth/downloader: fixes data race between synchronize and other methods (#21201) 2020-06-30 19:43:29 +02:00
events.go cmd,eth: 16400 Add an option to stop geth once in sync. WIP for light mode (#17321) 2019-01-30 08:40:36 +01:00
fakepeer.go core, eth, les, light: scope receipt functionality a bit cleaner 2019-04-15 13:42:26 +03:00
metrics.go metrics: pull library and introduce ResettingTimer and InfluxDB reporter (#15910) 2018-02-23 11:56:08 +02:00
modes.go eth/downloader: fixes data race between synchronize and other methods (#21201) 2020-06-30 19:43:29 +02:00
peer.go eth/downloader: don't use defer for unlock before return (#21227) 2020-06-15 15:46:27 +03:00
queue.go eth/downloader: more context in errors (#21067) 2020-05-29 11:12:43 +02:00
statesync.go trie: remove node ordering slice in sync batch (#19929) 2019-10-28 18:50:11 +01:00
testchain_test.go cosensus, core, eth, params, trie: fixes + clique history cap 2019-05-16 10:39:35 +03:00
types.go eth: conform better to the golint standards (#16783) 2018-06-14 13:14:52 +03:00