@@ -154,7 +154,7 @@ impl AnnounceHandler {
154154 ///
155155 /// Returns an error if the tracker is running in `listed` mode and the
156156 /// torrent is not whitelisted.
157- pub async fn announce (
157+ pub async fn handle_announcement (
158158 & self ,
159159 info_hash : & InfoHash ,
160160 peer : & mut peer:: Peer ,
@@ -178,7 +178,7 @@ impl AnnounceHandler {
178178
179179 let _number_of_downloads_increased = self
180180 . in_memory_torrent_repository
181- . upsert_peer ( info_hash, peer, opt_persistent_torrent)
181+ . handle_announcement ( info_hash, peer, opt_persistent_torrent)
182182 . await ;
183183
184184 Ok ( self . build_announce_data ( info_hash, peer, peers_wanted) . await )
@@ -456,7 +456,7 @@ mod tests {
456456 let mut peer = sample_peer ( ) ;
457457
458458 let announce_data = announce_handler
459- . announce ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
459+ . handle_announcement ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
460460 . await
461461 . unwrap ( ) ;
462462
@@ -469,7 +469,7 @@ mod tests {
469469
470470 let mut previously_announced_peer = sample_peer_1 ( ) ;
471471 announce_handler
472- . announce (
472+ . handle_announcement (
473473 & sample_info_hash ( ) ,
474474 & mut previously_announced_peer,
475475 & peer_ip ( ) ,
@@ -480,7 +480,7 @@ mod tests {
480480
481481 let mut peer = sample_peer_2 ( ) ;
482482 let announce_data = announce_handler
483- . announce ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
483+ . handle_announcement ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
484484 . await
485485 . unwrap ( ) ;
486486
@@ -493,7 +493,7 @@ mod tests {
493493
494494 let mut previously_announced_peer_1 = sample_peer_1 ( ) ;
495495 announce_handler
496- . announce (
496+ . handle_announcement (
497497 & sample_info_hash ( ) ,
498498 & mut previously_announced_peer_1,
499499 & peer_ip ( ) ,
@@ -504,7 +504,7 @@ mod tests {
504504
505505 let mut previously_announced_peer_2 = sample_peer_2 ( ) ;
506506 announce_handler
507- . announce (
507+ . handle_announcement (
508508 & sample_info_hash ( ) ,
509509 & mut previously_announced_peer_2,
510510 & peer_ip ( ) ,
@@ -515,7 +515,7 @@ mod tests {
515515
516516 let mut peer = sample_peer_3 ( ) ;
517517 let announce_data = announce_handler
518- . announce ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: only ( 1 ) )
518+ . handle_announcement ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: only ( 1 ) )
519519 . await
520520 . unwrap ( ) ;
521521
@@ -540,7 +540,7 @@ mod tests {
540540 let mut peer = seeder ( ) ;
541541
542542 let announce_data = announce_handler
543- . announce ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
543+ . handle_announcement ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
544544 . await
545545 . unwrap ( ) ;
546546
@@ -554,7 +554,7 @@ mod tests {
554554 let mut peer = leecher ( ) ;
555555
556556 let announce_data = announce_handler
557- . announce ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
557+ . handle_announcement ( & sample_info_hash ( ) , & mut peer, & peer_ip ( ) , & PeersWanted :: AsManyAsPossible )
558558 . await
559559 . unwrap ( ) ;
560560
@@ -568,7 +568,7 @@ mod tests {
568568 // We have to announce with "started" event because peer does not count if peer was not previously known
569569 let mut started_peer = started_peer ( ) ;
570570 announce_handler
571- . announce (
571+ . handle_announcement (
572572 & sample_info_hash ( ) ,
573573 & mut started_peer,
574574 & peer_ip ( ) ,
@@ -579,7 +579,7 @@ mod tests {
579579
580580 let mut completed_peer = completed_peer ( ) ;
581581 let announce_data = announce_handler
582- . announce (
582+ . handle_announcement (
583583 & sample_info_hash ( ) ,
584584 & mut completed_peer,
585585 & peer_ip ( ) ,
0 commit comments