From 9224303c1e869770565ceb7c2ffd9a9376744097 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 10 Aug 2019 18:46:07 +1000 Subject: [PATCH] Update all imports of dht to v2 --- Peer.go | 2 +- Peers.go | 2 +- client.go | 4 ++-- client_test.go | 2 +- config.go | 4 ++-- connection.go | 2 +- go.mod | 1 - go.sum | 20 -------------------- peer_protocol/pex.go | 2 +- torrent.go | 2 +- tracker/http.go | 2 +- tracker/peer.go | 2 +- tracker/server.go | 2 +- tracker/tracker.go | 2 +- tracker/udp.go | 2 +- tracker/udp_test.go | 2 +- tracker_scraper.go | 2 +- 17 files changed, 17 insertions(+), 38 deletions(-) diff --git a/Peer.go b/Peer.go index 266ce98e..85f673b5 100644 --- a/Peer.go +++ b/Peer.go @@ -3,7 +3,7 @@ package torrent import ( "net" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/Peers.go b/Peers.go index 5d88bb3e..32d902fb 100644 --- a/Peers.go +++ b/Peers.go @@ -1,7 +1,7 @@ package torrent import ( - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/tracker" ) diff --git a/client.go b/client.go index 847da20b..f8a4a151 100644 --- a/client.go +++ b/client.go @@ -16,8 +16,8 @@ import ( "strings" "time" - "github.com/anacrolix/dht" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/log" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/bitmap" diff --git a/client_test.go b/client_test.go index e0854867..b896ed7b 100644 --- a/client_test.go +++ b/client_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/time/rate" - "github.com/anacrolix/dht" + "github.com/anacrolix/dht/v2" _ "github.com/anacrolix/envpprof" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/filecache" diff --git a/config.go b/config.go index 4ca2ef07..584866dd 100644 --- a/config.go +++ b/config.go @@ -6,8 +6,8 @@ import ( "net/url" "time" - "github.com/anacrolix/dht" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/conntrack" "github.com/anacrolix/missinggo/expect" diff --git a/connection.go b/connection.go index 6d11f8ab..7fec0a43 100644 --- a/connection.go +++ b/connection.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "github.com/anacrolix/dht" + "github.com/anacrolix/dht/v2" "github.com/anacrolix/log" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/bitmap" diff --git a/go.mod b/go.mod index 80b1aa2c..1584a8f8 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/anacrolix/torrent require ( bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 github.com/RoaringBitmap/roaring v0.4.18 // indirect - github.com/anacrolix/dht v1.0.1 github.com/anacrolix/dht/v2 v2.0.1 github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa github.com/anacrolix/go-libutp v1.0.2 diff --git a/go.sum b/go.sum index 0b820a0c..9cec13c8 100644 --- a/go.sum +++ b/go.sum @@ -6,26 +6,19 @@ github.com/RoaringBitmap/roaring v0.4.18 h1:nh8Ngxctxt5QAoMLuR7MHJe4jEqpn+EnsdgD github.com/RoaringBitmap/roaring v0.4.18/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= github.com/anacrolix/dht v0.0.0-20180412060941-24cbf25b72a4 h1:0yHJvFiGQhJ1gSHJOR8xzmnx45orEt7uiIB6guf0+zc= github.com/anacrolix/dht v0.0.0-20180412060941-24cbf25b72a4/go.mod h1:hQfX2BrtuQsLQMYQwsypFAab/GvHg8qxwVi4OJdR1WI= -github.com/anacrolix/dht v0.0.0-20181129074040-b09db78595aa/go.mod h1:Ayu4t+5TsHQ07/P8XzRJqVofv7lU4R1ZTT7KW5+SPFA= -github.com/anacrolix/dht v1.0.1 h1:a7zVMiZWfPiToAUbjMZYeI3UvmsDP3j8vH5EDIAjM9c= -github.com/anacrolix/dht v1.0.1/go.mod h1:dtcIktBFD8YD/7ZcE5nQuuGGfLxcwa8+18mHl+GU+KA= github.com/anacrolix/dht/v2 v2.0.1 h1:gOHJ+OKqJ4Eb48OYStZm4AlWr1/nSA2TWlzb/+t36SA= github.com/anacrolix/dht/v2 v2.0.1/go.mod h1:GbTT8BaEtfqab/LPd5tY41f3GvYeii3mmDUK300Ycyo= github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa h1:xCaATLKmn39QqLs3tUZYr6eKvezJV+FYvVOLTklxK6U= github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= github.com/anacrolix/go-libutp v0.0.0-20180522111405-6baeb806518d/go.mod h1:beQSaSxwH2d9Eeu5ijrEnHei5Qhk+J6cDm1QkWFru4E= -github.com/anacrolix/go-libutp v0.0.0-20180808010927-aebbeb60ea05 h1:Zoniih3jyqtr3I0xFoMvw1USWpg+CbI/zOrcLudr0lc= -github.com/anacrolix/go-libutp v0.0.0-20180808010927-aebbeb60ea05/go.mod h1:POY/GPlrFKRxnOKH1sGAB+NBWMoP+sI+hHJxgcgWbWw= github.com/anacrolix/go-libutp v1.0.2 h1:cL2SfTCO418V+DQRdMEW+RNfO2InLqW6PsSLqHwmGR4= github.com/anacrolix/go-libutp v1.0.2/go.mod h1:uIH0A72V++j0D1nnmTjjZUiH/ujPkFxYWkxQ02+7S0U= github.com/anacrolix/log v0.0.0-20180412014343-2323884b361d h1:G8ITVMWuQL4adKRC3A6aBOo0YFJYcmpS3JFQd+rZrn0= github.com/anacrolix/log v0.0.0-20180412014343-2323884b361d/go.mod h1:sf/7c2aTldL6sRQj/4UKyjgVZBu2+M2z9wf7MmwPiew= -github.com/anacrolix/log v0.1.0/go.mod h1:sf/7c2aTldL6sRQj/4UKyjgVZBu2+M2z9wf7MmwPiew= github.com/anacrolix/log v0.2.0 h1:LzaW6XTEk2zcmLZkcZPkJ2mDdnZkOdOTeBH7Kt81ouU= github.com/anacrolix/log v0.2.0/go.mod h1:sf/7c2aTldL6sRQj/4UKyjgVZBu2+M2z9wf7MmwPiew= github.com/anacrolix/missinggo v0.0.0-20180522035225-b4a5853e62ff/go.mod h1:b0p+7cn+rWMIphK1gDH2hrDuwGOcbB6V4VXeSsEfHVk= github.com/anacrolix/missinggo v0.0.0-20180725070939-60ef2fbf63df/go.mod h1:kwGiTUTZ0+p4vAz3VbAI5a30t2YbvemcmspjKwrAz5s= -github.com/anacrolix/missinggo v0.0.0-20181129073415-3237bf955fed/go.mod h1:IN+9GUe7OxKMIs/XeXEbT/rMUolmJzmlZiXHS7FwD/Y= github.com/anacrolix/missinggo v0.2.1-0.20190310234110-9fbdc9f242a8 h1:E2Xb2SBsVzHJ1tNMW9QcckYEQcyBKz1ee8qVjeVRWys= github.com/anacrolix/missinggo v0.2.1-0.20190310234110-9fbdc9f242a8/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= github.com/anacrolix/missinggo v1.1.0 h1:0lZbaNa6zTR1bELAIzCNmRGAtkHuLDPJqTiTtXoAIx8= @@ -45,7 +38,6 @@ github.com/anacrolix/tagflag v0.0.0-20180605133421-f477c8c2f14c/go.mod h1:1m2U/K github.com/anacrolix/tagflag v0.0.0-20180803105420-3a8ff5428f76 h1:No2E3UEtiEcvy5juw8FNCrtjWUm+Rq9KB0cMcwMDNnc= github.com/anacrolix/tagflag v0.0.0-20180803105420-3a8ff5428f76/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/torrent v0.0.0-20180622074351-fefeef4ee9eb/go.mod h1:3vcFVxgOASslNXHdivT8spyMRBanMCenHRpe0u5vpBs= -github.com/anacrolix/torrent v1.0.1/go.mod h1:ZYV1Z2Wx3jXYSh26mDvneAbk8XIUxfvoVil2GW962zY= github.com/anacrolix/upnp v0.0.0-20190717072655-8249d7a81c03 h1:moiTMOh4ZQ8yELlyjgVY1dQF2PlrP2NQr2/qFD1eB1w= github.com/anacrolix/upnp v0.0.0-20190717072655-8249d7a81c03/go.mod h1:ufVftEeVgFwZQy/aZMVfogCLY/2z19vR7oI+dA3XBhg= github.com/anacrolix/utp v0.0.0-20180219060659-9e0e1d1d0572 h1:kpt6TQTVi6gognY+svubHfxxpq0DLU9AfTQyZVc3UOc= @@ -86,8 +78,6 @@ github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a h1:ZJu5NB1Bk5ms4vw0Xu4i+jD32SE9jQXyfnOvwhHqlT0= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -107,7 +97,6 @@ github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/ipfs/go-ipfs v0.4.18/go.mod h1:iXzbK+Wa6eePj3jQg/uY6Uoq5iOwY+GToD/bgaRadto= github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= @@ -126,7 +115,6 @@ github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0C github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -168,25 +156,17 @@ github.com/willf/bloom v2.0.3+incompatible h1:QDacWdqcAUI1MPOwIQZRy9kOR7yxfyEmxX github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190318221613-d196dffd7c2b h1:ZWpVMTsK0ey5WJCu+vVdfMldWq7/ezaOcjnKWIHWVkE= golang.org/x/net v0.0.0-20190318221613-d196dffd7c2b/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598 h1:S8GOgffXV1X3fpVG442QRfWOt0iFl79eHJ7OPt725bo= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca h1:o2TLx1bGN3W+Ei0EMU5fShLupLmTOU95KvJJmfYhAzM= -golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= diff --git a/peer_protocol/pex.go b/peer_protocol/pex.go index aeefd3fe..2347aa3e 100644 --- a/peer_protocol/pex.go +++ b/peer_protocol/pex.go @@ -1,6 +1,6 @@ package peer_protocol -import "github.com/anacrolix/dht/krpc" +import "github.com/anacrolix/dht/v2/krpc" type PexMsg struct { Added krpc.CompactIPv4NodeAddrs `bencode:"added"` diff --git a/torrent.go b/torrent.go index 9b1a920b..4bf314bc 100644 --- a/torrent.go +++ b/torrent.go @@ -16,7 +16,7 @@ import ( "github.com/davecgh/go-spew/spew" - "github.com/anacrolix/dht" + "github.com/anacrolix/dht/v2" "github.com/anacrolix/log" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/bitmap" diff --git a/tracker/http.go b/tracker/http.go index 65cb1989..ee365de7 100644 --- a/tracker/http.go +++ b/tracker/http.go @@ -12,7 +12,7 @@ import ( "strconv" "time" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/missinggo/httptoo" "github.com/anacrolix/torrent/bencode" ) diff --git a/tracker/peer.go b/tracker/peer.go index 6f13c569..90f88e46 100644 --- a/tracker/peer.go +++ b/tracker/peer.go @@ -3,7 +3,7 @@ package tracker import ( "net" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" ) type Peer struct { diff --git a/tracker/server.go b/tracker/server.go index be982230..34417be6 100644 --- a/tracker/server.go +++ b/tracker/server.go @@ -8,7 +8,7 @@ import ( "math/rand" "net" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/missinggo" ) diff --git a/tracker/tracker.go b/tracker/tracker.go index c3eefb98..93f11ccd 100644 --- a/tracker/tracker.go +++ b/tracker/tracker.go @@ -6,7 +6,7 @@ import ( "net/http" "net/url" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" ) // Marshalled as binary by the UDP client, so be careful making changes. diff --git a/tracker/udp.go b/tracker/udp.go index c694285d..9c9f99c4 100644 --- a/tracker/udp.go +++ b/tracker/udp.go @@ -12,7 +12,7 @@ import ( "net/url" "time" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/pproffd" "github.com/pkg/errors" diff --git a/tracker/udp_test.go b/tracker/udp_test.go index 3a22aee2..7a047b1a 100644 --- a/tracker/udp_test.go +++ b/tracker/udp_test.go @@ -13,7 +13,7 @@ import ( "sync" "testing" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" _ "github.com/anacrolix/envpprof" "github.com/pkg/errors" "github.com/stretchr/testify/assert" diff --git a/tracker_scraper.go b/tracker_scraper.go index d3820179..2c64390a 100644 --- a/tracker_scraper.go +++ b/tracker_scraper.go @@ -8,7 +8,7 @@ import ( "net/url" "time" - "github.com/anacrolix/dht/krpc" + "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/torrent/tracker" )