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: split global consts for limits #568

Merged

Commits on Jan 2, 2024

  1. refactor: [torrust#262] split global consts for limits

    Current const: `crate::shared::bit_torrent::common::MAX_SCRAPE_TORRENTS`
    
    `MAX_SCRAPE_TORRENTS` is the limit only for the number of torrents in a `scrape`request.
    
    New const: `crate::core::TORRENT_PEERS_LIMIT`
    
    `TORRENT_PEERS_LIMIT` is now the limit for the number of peers in an announce request (UDP and HTTP tracker).
    
    Besides, the endpoint to get the torrent details in the API does not limit the number of peers for the torrent. So the API returns all peers in the tracker. This could lead to performance issues and we might need to paginate results, but the API should either return all peers and paginate them in a new endpoint.
    josecelano committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    46e67a8 View commit details
    Browse the repository at this point in the history