-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dvovk/sync file level #8931
dvovk/sync file level #8931
Conversation
TotalBytes: uint64(t.Length()), | ||
DownloadedBytes: uint64(t.BytesCompleted()), | ||
SeedsCount: len(t.Metainfo().UrlList), | ||
PeersCount: len(peersOfThisFile), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is small confusion happened:
Seed
and Webseed
is not the same thing.
Dictionary:
Peer
- any node - it may or may not have file XSeed
- if you have file X, you become Seed of file X - other peers can request this file from youWebseed
it'sHttp Peer
- means we can download file X fromWebseed
by HTTP protocol (instead of Bittorrent protocol). So, in this func:webseed
andpeers
are "ingress traffic" for us (just different protocol).- Leech` - node which doen's have file X, but downloading it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed names
@@ -50,8 +50,8 @@ type TorrentFile struct { | |||
DownloadedBytes uint64 `json:"downloadedBytes"` | |||
SeedsCount int `json:"seedsCount"` | |||
PeersCount int `json:"peersCount"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then need reneame count field also
@@ -396,8 +396,8 @@ func (d *Downloader) ReCalcStats(interval time.Duration) { | |||
DownloadedBytes: uint64(t.BytesCompleted()), | |||
SeedsCount: len(t.Metainfo().UrlList), | |||
PeersCount: len(peersOfThisFile), | |||
WebseedsRate: websRates, | |||
SeedsRate: seedsRates, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I advise rename “seedsRate” to “peersRate”. Just because “Seed” word is not used anywhere in erigon: logs, p2p peers, etc…
No description provided.