@@ -1471,17 +1471,15 @@ where
14711471 . collect ( )
14721472 }
14731473
1474- fn get_secondary_fullnode_addrs (
1475- & self ,
1476- ) -> HashMap < NodeId < CertificateSignaturePubKey < ST > > , SocketAddrV4 > {
1474+ fn get_secondary_fullnodes ( & self ) -> Vec < NodeId < CertificateSignaturePubKey < ST > > > {
14771475 self . routing_info
1478- . iter ( )
1479- . filter ( |( id , _ ) | {
1476+ . keys ( )
1477+ . filter ( |id | {
14801478 self . participation_info
14811479 . get ( id)
14821480 . is_some_and ( |p| p. status == SecondaryRaptorcastConnectionStatus :: Connected )
14831481 } )
1484- . map ( | ( id , name_record ) | ( * id , name_record . address ( ) ) )
1482+ . copied ( )
14851483 . collect ( )
14861484 }
14871485
@@ -2247,7 +2245,7 @@ mod tests {
22472245 state. self_role = PeerDiscoveryRole :: ValidatorNone ;
22482246 let cmds = state. handle_full_node_raptorcast_request ( peer1_pubkey) ;
22492247 assert_eq ! ( cmds. len( ) , 0 ) ;
2250- assert_eq ! ( state. get_secondary_fullnode_addrs ( ) , HashMap :: new( ) ) ;
2248+ assert_eq ! ( state. get_secondary_fullnodes ( ) , Vec :: new( ) ) ;
22512249
22522250 // after receiving a full node raptorcast request from peer1,
22532251 // it should mark it as connected
@@ -2263,10 +2261,7 @@ mod tests {
22632261 target: _,
22642262 message: PeerDiscoveryMessage :: FullNodeRaptorcastResponse
22652263 } ) ) ;
2266- assert_eq ! (
2267- state. get_secondary_fullnode_addrs( ) ,
2268- HashMap :: from( [ ( peer1_pubkey, generate_name_record( peer1, 0 ) . address( ) ) ] )
2269- ) ;
2264+ assert_eq ! ( state. get_secondary_fullnodes( ) , Vec :: from( [ peer1_pubkey] ) ) ;
22702265 }
22712266
22722267 #[ test]
0 commit comments