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.
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.