Skip to content

Tracker does not exclude announcing peer from own peer list #700

Description

@thijmv

The tracker's peer handout policy should exclude the announcing peer from the peers it returns. However, it compares peers by pointer. Since the announcing peer and the stored peers are separate objects, the check never matches, and a peer can be handed its own address.

To resolve this, we should compare peer IDs instead. The existing test only passes because it reuses the same pointer, so it should be updated to use separate objects.

Activity

  1. nightcityblade commented on Oct 6, 2026

    @nightcityblade

    Hi, I'd like to work on this. I'll submit a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions