@@ -653,28 +653,6 @@ impl Tracker {
653
653
scrape_data
654
654
}
655
655
656
- /// It returns the data for a `scrape` response.
657
- fn get_swarm_metadata ( & self , info_hash : & InfoHash ) -> SwarmMetadata {
658
- self . in_memory_torrent_repository . get_swarm_metadata ( info_hash)
659
- }
660
-
661
- /// # Context: Tracker
662
- ///
663
- /// Get torrent peers for a given torrent and client.
664
- ///
665
- /// It filters out the client making the request.
666
- fn get_peers_for ( & self , info_hash : & InfoHash , peer : & peer:: Peer , limit : usize ) -> Vec < Arc < peer:: Peer > > {
667
- self . in_memory_torrent_repository . get_peers_for ( info_hash, peer, limit)
668
- }
669
-
670
- /// # Context: Tracker
671
- ///
672
- /// Get torrent peers for a given torrent.
673
- #[ must_use]
674
- pub fn get_torrent_peers ( & self , info_hash : & InfoHash ) -> Vec < Arc < peer:: Peer > > {
675
- self . in_memory_torrent_repository . get_torrent_peers ( info_hash)
676
- }
677
-
678
656
/// It updates the torrent entry in memory, it also stores in the database
679
657
/// the torrent info data which is persistent, and finally return the data
680
658
/// needed for a `announce` request response.
@@ -713,6 +691,28 @@ impl Tracker {
713
691
}
714
692
}
715
693
694
+ /// It returns the data for a `scrape` response.
695
+ fn get_swarm_metadata ( & self , info_hash : & InfoHash ) -> SwarmMetadata {
696
+ self . in_memory_torrent_repository . get_swarm_metadata ( info_hash)
697
+ }
698
+
699
+ /// # Context: Tracker
700
+ ///
701
+ /// Get torrent peers for a given torrent and client.
702
+ ///
703
+ /// It filters out the client making the request.
704
+ fn get_peers_for ( & self , info_hash : & InfoHash , peer : & peer:: Peer , limit : usize ) -> Vec < Arc < peer:: Peer > > {
705
+ self . in_memory_torrent_repository . get_peers_for ( info_hash, peer, limit)
706
+ }
707
+
708
+ /// # Context: Tracker
709
+ ///
710
+ /// Get torrent peers for a given torrent.
711
+ #[ must_use]
712
+ pub fn get_torrent_peers ( & self , info_hash : & InfoHash ) -> Vec < Arc < peer:: Peer > > {
713
+ self . in_memory_torrent_repository . get_torrent_peers ( info_hash)
714
+ }
715
+
716
716
/// It calculates and returns the general `Tracker`
717
717
/// [`TorrentsMetrics`]
718
718
///
0 commit comments