mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-20 23:04:47 -07:00
(untested) sanitize code
* remove peer argument from scrape swarm storage call * replace Peer field with netip.Addr in ScrapeRequest * add man for keydb storage * update readme
This commit is contained in:
@@ -166,10 +166,9 @@ func (s store) AnnouncePeers(ih bittorrent.InfoHash, seeder bool, numWant int, p
|
||||
}
|
||||
|
||||
// ScrapeSwarm is the same function as redis.ScrapeSwarm except `SCard` call instead of `HLen`
|
||||
func (s store) ScrapeSwarm(ih bittorrent.InfoHash, peer bittorrent.Peer) (leechers uint32, seeders uint32, snatched uint32) {
|
||||
func (s store) ScrapeSwarm(ih bittorrent.InfoHash) (leechers uint32, seeders uint32, snatched uint32) {
|
||||
log.Debug("storage: KeyDB ScrapeSwarm", log.Fields{
|
||||
"infoHash": ih,
|
||||
"peer": peer,
|
||||
})
|
||||
leechers, seeders = s.CountPeers(ih, s.SCard)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user