-
Notifications
You must be signed in to change notification settings - Fork 51
Overhaul core Tracker: review whitelist functionality (part 2) #1270
Copy link
Copy link
Labels
- Developer -Torrust Improvement ExperienceTorrust Improvement ExperienceCode Cleanup / RefactoringTidying and Making NeatTidying and Making Neat
Description
Parent issue: #1261
Relates to:
- Overhaul core Tracker: review whitelist functionality #1269
- Overhaul core Tracker: review whitelist functionality #1268
This is second part of the implementation of this issue.
I decided to merge the PR for the issue #1268 before continuing working of the refactor.
Sub-tasks
- In the tracker-core announce handler return a
Result<AnnounceData, AnnounceError>when the torrent is not included in the whitelist. - In the tracker-core scrape handler return a
Result<ScrapeData, ScrapeError>so we are able to return errors in the future without breaking the public API. - Move
packages::udp_tracker_core::peer_builder::from_requestto new packageudp-protocol - Inline
invokefunction in handlers when possible. -
Move tests for the handlers (announce and scrape) from HTTP server to. *1http_tracker_core -
Move tests for the handlers (announce and scrape) from UDP server to. *1udp_tracker_core
NOTE*1: instead of moving the tests I will create new ones for the http_tracker_core after refactoring all packages. The tests contain logic from the delivery layer that it will not be moved to the http_tracker_core so It will be harder to refactor those tests than created new one for the logic that we will finally move to the http_tracker_core.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- Developer -Torrust Improvement ExperienceTorrust Improvement ExperienceCode Cleanup / RefactoringTidying and Making NeatTidying and Making Neat