-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Currently stage_snapshotsync calls the downloader API for headers, then other stuff. The responsibilities for filtering and understanding the file types has been pushed down too close to the downloader. Additionally the API provides no way for callers to distinguish what files they are interested in: The downloader slurps down anything on the disk, and assumes "completion" relates to any torrents it knows about.
Anything to do with file name filters needs to be pushed up out of the downloader, and up into chain-specific code (beyond even the stage snapshot sync code). The downloader should be agnostic of any stage concepts.
Probably the logging of progress should be moved out of the downloader too. The API should probably be providing the ability to add, remove, and query the state of files from the downloader.
This might span more than just network/p2p. @mh0lt has a great vision for this.