mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-15 12:58:10 -07:00
Organize peers by subnet.
This commit restructures PeerMaps to be a map from Subnet to PeerID to Peer. This reduces the complexity require to gather peers from the same subnet.
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ import "github.com/chihaya/chihaya/tracker/models"
|
||||
// HandleScrape encapsulates all the logic of handling a BitTorrent client's
|
||||
// scrape without being coupled to any transport protocol.
|
||||
func (tkr *Tracker) HandleScrape(scrape *models.Scrape, w Writer) (err error) {
|
||||
if tkr.cfg.PrivateEnabled {
|
||||
if tkr.Config.PrivateEnabled {
|
||||
if _, err = tkr.FindUser(scrape.Passkey); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user