From: Matt Joiner Date: Tue, 29 Apr 2025 03:17:25 +0000 (+1000) Subject: Fix overlapping torrent data in a test helper X-Git-Tag: v1.59.0~183 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=55b57cf8caa4c72dcd693cf97024288cde2a7afb;p=btrtrc.git Fix overlapping torrent data in a test helper --- diff --git a/client_test.go b/client_test.go index fc83684b..73ea3630 100644 --- a/client_test.go +++ b/client_test.go @@ -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 d0535a99..8323cdd0 100644 --- 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