967d8de77a
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> |
||
---|---|---|
.. | ||
api.go | ||
downloader_test.go | ||
downloader.go | ||
events.go | ||
fakepeer.go | ||
metrics.go | ||
modes.go | ||
peer.go | ||
queue.go | ||
statesync.go | ||
testchain_test.go | ||
types.go |