From 932b462e3cd247680395e0473c16cdd141ace306 Mon Sep 17 00:00:00 2001
From: Matt Joiner <anacrolix@gmail.com>
Date: Thu, 24 Apr 2025 23:07:52 +1000
Subject: [PATCH] Add a few TODOs and fixes to trackerScraper

---
 torrent.go         | 1 +
 tracker_scraper.go | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/torrent.go b/torrent.go
index f6d39523..280ae450 100644
--- a/torrent.go
+++ b/torrent.go
@@ -3002,6 +3002,7 @@ func (t *Torrent) pieceRequestIndexOffset(piece pieceIndex) RequestIndex {
 }
 
 func (t *Torrent) updateComplete() {
+	// TODO: Announce complete to trackers?
 	t.complete.SetBool(t.haveAllPieces())
 }
 
diff --git a/tracker_scraper.go b/tracker_scraper.go
index cc7ba423..399fa63f 100644
--- a/tracker_scraper.go
+++ b/tracker_scraper.go
@@ -25,6 +25,7 @@ type trackerScraper struct {
 	lastAnnounce    trackerAnnounceResult
 	lookupTrackerIp func(*url.URL) ([]net.IP, error)
 
+	// TODO: chansync
 	stopOnce sync.Once
 	stopCh   chan struct{}
 }
@@ -36,7 +37,7 @@ type torrentTrackerAnnouncer interface {
 	Stop()
 }
 
-func (me trackerScraper) URL() *url.URL {
+func (me *trackerScraper) URL() *url.URL {
 	return &me.u
 }
 
@@ -219,6 +220,7 @@ func (me *trackerScraper) Run() {
 
 	ctx, cancel := context.WithCancel(context.Background())
 	defer cancel()
+	// TODO: Get rid of the need for this.
 	go func() {
 		defer cancel()
 		select {
-- 
2.51.0