Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trackerslist: convert from git submodule to go package #4761

Merged
merged 2 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
[submodule "tests"]
path = tests/testdata
url = https://github.com/ethereum/tests
[submodule "cmd/downloader/trackers/trackerslist"]
path = cmd/downloader/trackers/trackerslist
url = https://github.com/ngosang/trackerslist.git

[submodule "libmdbx"]
path = libmdbx
url = https://github.com/torquem-ch/libmdbx.git
29 changes: 9 additions & 20 deletions cmd/downloader/trackers/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,18 @@ package trackers

import (
"bufio"
_ "embed"
"strings"
)

//go:embed trackerslist/trackers_best.txt
var best string
var Best = split(best)

//go:embed trackerslist/trackers_all_https.txt
var https string
var Https = split(https)

//go:embed trackerslist/trackers_all_http.txt
var http string
var Http = split(http)

//go:embed trackerslist/trackers_all_udp.txt
var udp string
var Udp = split(udp)
"github.com/ledgerwatch/trackerslist"
)

//go:embed trackerslist/trackers_all_ws.txt
var ws string
var Ws = split(ws)
var (
Best = split(trackerslist.Best)
Https = split(trackerslist.Https)
Http = split(trackerslist.Http)
Udp = split(trackerslist.Udp)
Ws = split(trackerslist.Ws)
)

func split(txt string) (lines []string) {
sc := bufio.NewScanner(strings.NewReader(txt))
Expand Down
1 change: 0 additions & 1 deletion cmd/downloader/trackers/trackerslist
Submodule trackerslist deleted from 17f277
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ go 1.18
require (
github.com/ledgerwatch/erigon-lib v0.0.0-20220719140506-af5355ee9286
github.com/ledgerwatch/erigon-snapshot v1.0.0
github.com/ledgerwatch/log/v3 v3.4.1
github.com/ledgerwatch/secp256k1 v1.0.0
github.com/ledgerwatch/trackerslist v1.0.0
)

require (
Expand Down Expand Up @@ -41,8 +44,6 @@ require (
github.com/json-iterator/go v1.1.12
github.com/julienschmidt/httprouter v1.3.0
github.com/kevinburke/go-bindata v3.21.0+incompatible
github.com/ledgerwatch/log/v3 v3.4.1
github.com/ledgerwatch/secp256k1 v1.0.0
github.com/nxadm/tail v1.4.9-0.20211216163028-4472660a31a6
github.com/pelletier/go-toml v1.9.5
github.com/pelletier/go-toml/v2 v2.0.2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ github.com/ledgerwatch/log/v3 v3.4.1 h1:/xGwlVulXnsO9Uq+tzaExc8OWmXXHU0dnLalpbnY
github.com/ledgerwatch/log/v3 v3.4.1/go.mod h1:VXcz6Ssn6XEeU92dCMc39/g1F0OYAjw1Mt+dGP5DjXY=
github.com/ledgerwatch/secp256k1 v1.0.0 h1:Usvz87YoTG0uePIV8woOof5cQnLXGYa162rFf3YnwaQ=
github.com/ledgerwatch/secp256k1 v1.0.0/go.mod h1:SPmqJFciiF/Q0mPt2jVs2dTr/1TZBTIA+kPMmKgBAak=
github.com/ledgerwatch/trackerslist v1.0.0 h1:6gnQu93WCTL4jPcdmc8UEmw56Cb8IFQHLGnevfIeLwo=
github.com/ledgerwatch/trackerslist v1.0.0/go.mod h1:pCC+eEw8izNcnBBiSwvIq8kKsxDLInAafSW275jqFrg=
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
github.com/lispad/go-generics-tools v1.1.0 h1:mbSgcxdFVmpoyso1X/MJHXbSbSL3dD+qhRryyxk+/XY=
Expand Down
62 changes: 0 additions & 62 deletions turbo/snapshotsync/parallelcompress/decompress.go

This file was deleted.