plugeth/eth/downloader
Martin Holst Swende 967d8de77a
eth/downloader: fix peer idleness tracking when restarting state sync (#21260)
This fixes two issues with state sync restarts:

When sync restarts with a new root, some peers can have in-flight requests.
Since all peers with active requests were marked idle when exiting sync,
the new sync would schedule more requests for those peers. When the
response for the earlier request arrived, the new sync would reject it and
mark the peer idle again, rendering the peer useless until it disconnected.

The other issue was that peers would not be marked idle when they had
delivered a response, but the response hadn't been processed before
restarting the state sync. This also made the peer useless because it
would be permanently marked busy.

Co-authored-by: Felix Lange <fjl@twurst.com>
2020-07-08 23:08:08 +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: fix peer idleness tracking when restarting state sync (#21260) 2020-07-08 23:08:08 +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 eth/downloader: fix peer idleness tracking when restarting state sync (#21260) 2020-07-08 23:08:08 +02: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