`XCAsyncTestCase` does not work as intended but `wait {}` does what
we need.
restored `needsToStartScanningWhenStopped` as a Bool var on actor
fixed Enhancement test
- Sample app refactored for the processor being an actor
- tests refactored as well
- dark side tests fixed
- utilities separated to new file
- synchronizer's start and stop are no longer in async context
- updating the UI for the scan fixed
Issue Reported:
When the synchronizer is stopped, the processor does not cancel
the download correctly. Then when attempting to resume sync, the
synchronizer is not on .stopped and can't be resumed
this doesn't appear to happen in master branch that uses
structured concurrency for operations.
Fix:
This commit makes sure that the download streamer checks cancelation
before processing any block, or getting called back to report progress