• Marius van der Wijden's avatar
    eth/downloader: fixes data race between synchronize and other methods (#21201) · d671dbd5
    Marius van der Wijden authored
    * 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
    d671dbd5
Name
Last commit
Last update
..
downloader Loading commit data...
fetcher Loading commit data...
filters Loading commit data...
gasprice Loading commit data...
tracers Loading commit data...
api.go Loading commit data...
api_backend.go Loading commit data...
api_test.go Loading commit data...
api_tracer.go Loading commit data...
backend.go Loading commit data...
bloombits.go Loading commit data...
config.go Loading commit data...
discovery.go Loading commit data...
gen_config.go Loading commit data...
handler.go Loading commit data...
handler_test.go Loading commit data...
helper_test.go Loading commit data...
peer.go Loading commit data...
protocol.go Loading commit data...
protocol_test.go Loading commit data...
sync.go Loading commit data...
sync_test.go Loading commit data...