@@ -183,7 +183,7 @@ fn create_nodes(num_messengers: u8) -> Vec<MessengerNode> {
183183 nodes
184184}
185185
186- fn pass_along_path ( path : & Vec < MessengerNode > , expected_path_id : Option < [ u8 ; 32 ] > ) {
186+ fn pass_along_path ( path : & Vec < MessengerNode > ) {
187187 let mut prev_node = & path[ 0 ] ;
188188 for node in path. into_iter ( ) . skip ( 1 ) {
189189 let events = prev_node. messenger . release_pending_msgs ( ) ;
@@ -204,7 +204,7 @@ fn one_hop() {
204204
205205 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: Node ( nodes[ 1 ] . get_node_pk ( ) ) , test_msg, None ) . unwrap ( ) ;
206206 nodes[ 1 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
207- pass_along_path ( & nodes, None ) ;
207+ pass_along_path ( & nodes) ;
208208}
209209
210210#[ test]
@@ -214,7 +214,7 @@ fn two_unblinded_hops() {
214214
215215 nodes[ 0 ] . messenger . send_onion_message ( & [ nodes[ 1 ] . get_node_pk ( ) ] , Destination :: Node ( nodes[ 2 ] . get_node_pk ( ) ) , test_msg, None ) . unwrap ( ) ;
216216 nodes[ 2 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
217- pass_along_path ( & nodes, None ) ;
217+ pass_along_path ( & nodes) ;
218218}
219219
220220#[ test]
@@ -227,7 +227,7 @@ fn two_unblinded_two_blinded() {
227227
228228 nodes[ 0 ] . messenger . send_onion_message ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , Destination :: BlindedPath ( blinded_path) , test_msg, None ) . unwrap ( ) ;
229229 nodes[ 4 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
230- pass_along_path ( & nodes, None ) ;
230+ pass_along_path ( & nodes) ;
231231}
232232
233233#[ test]
@@ -240,7 +240,7 @@ fn three_blinded_hops() {
240240
241241 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , test_msg, None ) . unwrap ( ) ;
242242 nodes[ 3 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
243- pass_along_path ( & nodes, None ) ;
243+ pass_along_path ( & nodes) ;
244244}
245245
246246#[ test]
@@ -267,14 +267,14 @@ fn we_are_intro_node() {
267267
268268 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg. clone ( ) ) , None ) . unwrap ( ) ;
269269 nodes[ 2 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
270- pass_along_path ( & nodes, None ) ;
270+ pass_along_path ( & nodes) ;
271271
272272 // Try with a two-hop blinded path where we are the introduction node.
273273 let blinded_path = BlindedPath :: new ( & [ nodes[ 0 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) ] , & * nodes[ 1 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
274274 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg) , None ) . unwrap ( ) ;
275275 nodes[ 1 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
276276 nodes. remove ( 2 ) ;
277- pass_along_path ( & nodes, None ) ;
277+ pass_along_path ( & nodes) ;
278278}
279279
280280#[ test]
@@ -308,23 +308,23 @@ fn reply_path() {
308308 let reply_path = BlindedPath :: new ( & [ nodes[ 2 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 0 ] . get_node_pk ( ) ] , & * nodes[ 0 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
309309 nodes[ 0 ] . messenger . send_onion_message ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , Destination :: Node ( nodes[ 3 ] . get_node_pk ( ) ) , OnionMessageContents :: Custom ( test_msg. clone ( ) ) , Some ( reply_path) ) . unwrap ( ) ;
310310 nodes[ 3 ] . custom_handler . expect_message ( TestCustomMessage :: Request ) ;
311- pass_along_path ( & nodes, None ) ;
311+ pass_along_path ( & nodes) ;
312312 // Make sure the last node successfully decoded the reply path.
313313 nodes[ 0 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
314314 nodes. reverse ( ) ;
315- pass_along_path ( & nodes, None ) ;
315+ pass_along_path ( & nodes) ;
316316
317317 // Destination::BlindedPath
318318 let blinded_path = BlindedPath :: new ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) , nodes[ 3 ] . get_node_pk ( ) ] , & * nodes[ 3 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
319319 let reply_path = BlindedPath :: new ( & [ nodes[ 2 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 0 ] . get_node_pk ( ) ] , & * nodes[ 0 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
320320
321321 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg) , Some ( reply_path) ) . unwrap ( ) ;
322322 nodes[ 3 ] . custom_handler . expect_message ( TestCustomMessage :: Request ) ;
323- pass_along_path ( & nodes, None ) ;
323+ pass_along_path ( & nodes) ;
324324 // Make sure the last node successfully decoded the reply path.
325325 nodes[ 0 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
326326 nodes. reverse ( ) ;
327- pass_along_path ( & nodes, None ) ;
327+ pass_along_path ( & nodes) ;
328328}
329329
330330#[ test]
0 commit comments