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

Refactor BEP 30 implementation #516

Merged

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Mar 5, 2024

Refactor BEP 30 implementation to make it clearer and simplify implementation.

  • Rename table field torrust_torrents::root_hash to is_bep_30. It's not the root hash value in BEP 30. It's a flag for BEP 30 torrents.
  • Don't reuse torrust_torrents::pieces field for BEP 30 torrents. Add a new field root_hash.

BEP 30: https://www.bittorrent.org/beps/bep_0030.html

@josecelano josecelano marked this pull request as draft March 5, 2024 11:42
@josecelano josecelano linked an issue Mar 5, 2024 that may be closed by this pull request
@josecelano josecelano added this to the v3.0.0 milestone Mar 5, 2024
@josecelano josecelano self-assigned this Mar 5, 2024
@josecelano josecelano added the - Developer - Torrust Improvement Experience label Mar 5, 2024
…-30 torrents

instead of reusing the `pieces` field in `torrust_torrents` table.

That decouples BEP-30 implementation. In the future we migth want to
remove support for BEP 30 since it's decrecated and not supported by
clients or libs.
@josecelano josecelano marked this pull request as ready for review March 5, 2024 13:39
@josecelano
Copy link
Member Author

ACK 7390616

@josecelano josecelano merged commit a149f21 into torrust:develop Mar 5, 2024
12 of 13 checks passed
@josecelano josecelano changed the title Refactor BEP 30 implmentation Refactor BEP 30 implementation Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Developer - Torrust Improvement Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor BEP 30 implementation
1 participant