Fix Purge reporting all peers as Seeders

PeerMaps now are constructed with a boolean value that tells the map
whether they are hosting seeders or leechers.
This commit is contained in:
Jimmy Zelinskie
2014-08-05 06:53:35 -04:00
parent 01fa778ce2
commit fc18028796
3 changed files with 17 additions and 8 deletions

View File

@@ -374,8 +374,8 @@ func loadPrivateTestData(tkr *tracker.Tracker) error {
torrent := &models.Torrent{
ID: 1,
Infohash: infoHash,
Seeders: models.NewPeerMap(),
Leechers: models.NewPeerMap(),
Seeders: models.NewPeerMap(true),
Leechers: models.NewPeerMap(false),
}
return conn.PutTorrent(torrent)