kaiyyang / cpsc416_GroupProject_ReliableBT

Mozilla Public License 2.0
2 stars 0 forks source link

Measure swarm size in tracker #5

Closed annieliu10 closed 1 year ago

Maxwell-Yang-2001 commented 1 year ago

Through some more investigation in the tracker repo, swarm size can be easily obtained through an access to its database with the torrent's InfoHash as the key (which will be a collection of all the peers of the specified torrent in the current communication). Will write a trivial helper function later for this.

Maxwell-Yang-2001 commented 1 year ago

As of the latest changes, this would be a simple one-liner that will be added when we actually have a need to invoke it (first-attempt bad actor identification utilizes number of leechers in the swarm rather than the entire swarm size). Closing it for now.