]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix overlapping torrent data in a test helper
authorMatt Joiner <anacrolix@gmail.com>
Tue, 29 Apr 2025 03:17:25 +0000 (13:17 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 29 Apr 2025 03:17:25 +0000 (13:17 +1000)
client_test.go
spec.go

index fc83684b6ef6d7e9422aabf5e1bb141dbd58e219..73ea3630c4b481cc53dbc0fb98b5c3a5e815b15f 100644 (file)
@@ -745,7 +745,7 @@ func testSeederLeecherPair(t *testing.T, seeder, leecher func(*ClientConfig)) {
        // against more than one torrent. See issue #114
        makeMagnet(t, server, cfg.DataDir, "test2")
        for i := 0; i < 100; i++ {
-               makeMagnet(t, server, cfg.DataDir, fmt.Sprintf("test%d", i+2))
+               makeMagnet(t, server, cfg.DataDir, fmt.Sprintf("test%d", i+3))
        }
        cfg = TestingConfig(t)
        cfg.DataDir = filepath.Join(cfg.DataDir, "client")
diff --git a/spec.go b/spec.go
index d0535a99e191801bae31d008dd269d8bda93f587..8323cdd0b77fc2d867615506123c173902cf5423 100644 (file)
--- a/spec.go
+++ b/spec.go
@@ -39,6 +39,7 @@ type TorrentSpec struct {
        // TODO: Move into a "new" Torrent opt type.
        Storage storage.ClientImpl
 
+       // TODO: This should be on AddTorrentOpt too?
        DisableInitialPieceCheck bool
 
        // Whether to allow data download or upload