good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
Erigon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
a
Erigon
Commits
1214831c
Unverified
Commit
1214831c
authored
3 years ago
by
Alex Sharov
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
downloader reduce amount of trackers to 10 (#3394)
parent
0f44a545
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/downloader/trackers/embed.go
+17
-8
17 additions, 8 deletions
cmd/downloader/trackers/embed.go
cmd/downloader/trackers/trackerslist
+1
-1
1 addition, 1 deletion
cmd/downloader/trackers/trackerslist
with
18 additions
and
9 deletions
cmd/downloader/trackers/embed.go
+
17
−
8
View file @
1214831c
...
...
@@ -7,23 +7,19 @@ import (
//go:embed trackerslist/trackers_best.txt
var
best
string
var
Best
=
strings
.
Split
(
best
,
"
\n\n
"
)
var
Best
=
first10
(
strings
.
Split
(
best
,
"
\n\n
"
)
)
//go:embed trackerslist/trackers_all_https.txt
var
https
string
var
Https
=
withoutBest
(
strings
.
Split
(
https
,
"
\n\n
"
))
//go:embed trackerslist/trackers_all_http.txt
var
http
string
var
Http
=
withoutBest
(
strings
.
Split
(
http
,
"
\n\n
"
))
var
Https
=
first10
(
withoutBest
(
strings
.
Split
(
https
,
"
\n\n
"
)))
//go:embed trackerslist/trackers_all_udp.txt
var
udp
string
var
Udp
=
withoutBest
(
strings
.
Split
(
udp
,
"
\n\n
"
))
var
Udp
=
first10
(
withoutBest
(
strings
.
Split
(
udp
,
"
\n\n
"
))
)
//go:embed trackerslist/trackers_all_ws.txt
var
ws
string
var
Ws
=
withoutBest
(
strings
.
Split
(
ws
,
"
\n\n
"
))
var
Ws
=
first10
(
withoutBest
(
strings
.
Split
(
ws
,
"
\n\n
"
))
)
func
withoutBest
(
in
[]
string
)
(
res
[]
string
)
{
Loop
:
...
...
@@ -33,6 +29,19 @@ Loop:
continue
Loop
}
}
//skip unsecure protocols
if
strings
.
HasPrefix
(
tracker
,
"ws://"
)
||
strings
.
HasPrefix
(
tracker
,
"http://"
)
{
continue
}
res
=
append
(
res
,
tracker
)
}
return
res
}
func
first10
(
in
[]
string
)
(
res
[]
string
)
{
for
i
,
tracker
:=
range
in
{
if
i
>=
10
{
break
}
res
=
append
(
res
,
tracker
)
}
return
res
...
...
This diff is collapsed.
Click to expand it.
trackerslist
@
0ccaf80d
Compare
40110ecd
...
0ccaf80d
Subproject commit
40110ecd394cd66c749ca5fe278e36cb444bdbf8
Subproject commit
0ccaf80da5f0e813841514c2dec4798bbed3372a
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment