Skip to content

Overhaul core Tracker: review whitelist functionality (part 2) #1270

@josecelano

Description

@josecelano

Parent issue: #1261
Relates to:

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_request to new package udp-protocol
  • Inline invoke function in handlers when possible.
  • Move tests for the handlers (announce and scrape) from HTTP server to http_tracker_core. *1
  • Move tests for the handlers (announce and scrape) from UDP server to udp_tracker_core. *1

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.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions