Commit 0a4c805
committed
refactor: [torrust#1495] add SwarmMetadata to Swarm
- Moved responsability for keeping metadata to the Swarm type.
- Number of seeder and leechers is now calculated when the Swarm changes
not on-demand. We avoid iterating over the peers to get the number of
seeders and leechers.
- The number of downloads is also calculate now in the Swarm. It will be
removed from the TrackedTorrent.1 parent 2882705 commit 0a4c805
File tree
2 files changed
+503
-166
lines changed- packages
- primitives/src
- torrent-repository/src/entry
2 files changed
+503
-166
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
0 commit comments