Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract duplicate implementation of InfoHash struct #251

Closed
josecelano opened this issue Aug 4, 2023 · 1 comment · Fixed by #756
Closed

Extract duplicate implementation of InfoHash struct #251

josecelano opened this issue Aug 4, 2023 · 1 comment · Fixed by #756
Assignees
Labels
Code Cleanup / Refactoring Tidying and Making Neat
Milestone

Comments

@josecelano
Copy link
Member

josecelano commented Aug 4, 2023

Relates to: torrust/torrust-tracker#360

We are duplicating code for:

pub struct InfoHash(pub [u8; 20]);` struct

We should extract a common BitTorrent protocol crate for both the Tracker and the Index Backend.

@josecelano
Copy link
Member Author

Documentation for the InfoHash have been improved here:

bc04231

@cgbosse cgbosse added the Code Cleanup / Refactoring Tidying and Making Neat label Jan 10, 2024
@cgbosse cgbosse moved this to Maintenance in Torrust Solution Jan 10, 2024
@cgbosse cgbosse added this to the v3.0.0 milestone Jan 16, 2024
@josecelano josecelano modified the milestones: v3.0.0, v3.1.0 Feb 23, 2024
@josecelano josecelano modified the milestones: v3.1.0, v3.0.0 Jun 12, 2024
@cgbosse cgbosse modified the milestones: v3.0.0, v3.1.0 Jul 3, 2024
@josecelano josecelano self-assigned this Oct 30, 2024
josecelano added a commit to torrust/torrust-tracker that referenced this issue Oct 31, 2024
… struct

7fe648c refactor: replace InfoHash with external extracted crate (Jose Celano)
7d7dba5 feat: add dep bittorrent-primitives (Jose Celano)

Pull request description:

  Relates to:
    - torrust/torrust-index#251
    - torrust/torrust-index#756

  The `InfoHash` type was duplicated here and in the [Index](torrust/torrust-index#251). I've extracted it into a new crate. I'm planning to move the very basic types that we are using in other projects.

  I'm also planning to extract more packages like:

  - UDP tracker client
  - HTTP tracker client
  - Tracker console client (after merging UDP console client, HTTP console client and Tracker checker). See #669

  Some of those new packages also depend on this new [bittorrent-primitives](https://github.com/torrust/bittorrent-primitives) crate.

ACKs for top commit:
  josecelano:
    ACK 7fe648c

Tree-SHA512: 3ab5b2ef8631ae72b792dea6b1c9ab1e64b28f170d4580109872739427f0f50ae753af014d691e41bdffbf3a33da732cba89fd1487b9e219345e74b15599b1b7
@github-project-automation github-project-automation bot moved this from Maintenance to Done in Torrust Solution Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup / Refactoring Tidying and Making Neat
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants