@@ -54,6 +54,7 @@ impl MessageRouter for TestMessageRouter {
5454 Ok ( OnionMessagePath {
5555 intermediate_nodes : vec ! [ ] ,
5656 destination,
57+ addresses : None ,
5758 } )
5859 }
5960}
@@ -204,6 +205,7 @@ fn one_unblinded_hop() {
204205 let path = OnionMessagePath {
205206 intermediate_nodes : vec ! [ ] ,
206207 destination : Destination :: Node ( nodes[ 1 ] . get_node_pk ( ) ) ,
208+ addresses : None ,
207209 } ;
208210 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
209211 nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -218,6 +220,7 @@ fn two_unblinded_hops() {
218220 let path = OnionMessagePath {
219221 intermediate_nodes : vec ! [ nodes[ 1 ] . get_node_pk( ) ] ,
220222 destination : Destination :: Node ( nodes[ 2 ] . get_node_pk ( ) ) ,
223+ addresses : None ,
221224 } ;
222225 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
223226 nodes[ 2 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -234,6 +237,7 @@ fn one_blinded_hop() {
234237 let path = OnionMessagePath {
235238 intermediate_nodes : vec ! [ ] ,
236239 destination : Destination :: BlindedPath ( blinded_path) ,
240+ addresses : None ,
237241 } ;
238242 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
239243 nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -250,6 +254,7 @@ fn two_unblinded_two_blinded() {
250254 let path = OnionMessagePath {
251255 intermediate_nodes : vec ! [ nodes[ 1 ] . get_node_pk( ) , nodes[ 2 ] . get_node_pk( ) ] ,
252256 destination : Destination :: BlindedPath ( blinded_path) ,
257+ addresses : None ,
253258 } ;
254259
255260 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
@@ -267,6 +272,7 @@ fn three_blinded_hops() {
267272 let path = OnionMessagePath {
268273 intermediate_nodes : vec ! [ ] ,
269274 destination : Destination :: BlindedPath ( blinded_path) ,
275+ addresses : None ,
270276 } ;
271277
272278 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
@@ -285,6 +291,7 @@ fn too_big_packet_error() {
285291 let path = OnionMessagePath {
286292 intermediate_nodes : hops,
287293 destination : Destination :: Node ( hop_node_id) ,
294+ addresses : None ,
288295 } ;
289296 let err = nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap_err ( ) ;
290297 assert_eq ! ( err, SendError :: TooBigPacket ) ;
@@ -302,6 +309,7 @@ fn we_are_intro_node() {
302309 let path = OnionMessagePath {
303310 intermediate_nodes : vec ! [ ] ,
304311 destination : Destination :: BlindedPath ( blinded_path) ,
312+ addresses : None ,
305313 } ;
306314
307315 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg. clone ( ) , None ) . unwrap ( ) ;
@@ -313,6 +321,7 @@ fn we_are_intro_node() {
313321 let path = OnionMessagePath {
314322 intermediate_nodes : vec ! [ ] ,
315323 destination : Destination :: BlindedPath ( blinded_path) ,
324+ addresses : None ,
316325 } ;
317326 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
318327 nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -333,6 +342,7 @@ fn invalid_blinded_path_error() {
333342 let path = OnionMessagePath {
334343 intermediate_nodes : vec ! [ ] ,
335344 destination : Destination :: BlindedPath ( blinded_path) ,
345+ addresses : None ,
336346 } ;
337347 let err = nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg. clone ( ) , None ) . unwrap_err ( ) ;
338348 assert_eq ! ( err, SendError :: TooFewBlindedHops ) ;
@@ -348,6 +358,7 @@ fn reply_path() {
348358 let path = OnionMessagePath {
349359 intermediate_nodes : vec ! [ nodes[ 1 ] . get_node_pk( ) , nodes[ 2 ] . get_node_pk( ) ] ,
350360 destination : Destination :: Node ( nodes[ 3 ] . get_node_pk ( ) ) ,
361+ addresses : None ,
351362 } ;
352363 let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 2 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 0 ] . get_node_pk ( ) ] , & * nodes[ 0 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
353364 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg. clone ( ) , Some ( reply_path) ) . unwrap ( ) ;
@@ -363,6 +374,7 @@ fn reply_path() {
363374 let path = OnionMessagePath {
364375 intermediate_nodes : vec ! [ ] ,
365376 destination : Destination :: BlindedPath ( blinded_path) ,
377+ addresses : None ,
366378 } ;
367379 let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 2 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 0 ] . get_node_pk ( ) ] , & * nodes[ 0 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
368380
@@ -396,6 +408,7 @@ fn invalid_custom_message_type() {
396408 let path = OnionMessagePath {
397409 intermediate_nodes : vec ! [ ] ,
398410 destination : Destination :: Node ( nodes[ 1 ] . get_node_pk ( ) ) ,
411+ addresses : None ,
399412 } ;
400413 let err = nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap_err ( ) ;
401414 assert_eq ! ( err, SendError :: InvalidMessage ) ;
@@ -408,6 +421,7 @@ fn peer_buffer_full() {
408421 let path = OnionMessagePath {
409422 intermediate_nodes : vec ! [ ] ,
410423 destination : Destination :: Node ( nodes[ 1 ] . get_node_pk ( ) ) ,
424+ addresses : None ,
411425 } ;
412426 for _ in 0 ..188 { // Based on MAX_PER_PEER_BUFFER_SIZE in OnionMessenger
413427 nodes[ 0 ] . messenger . send_onion_message_using_path ( path. clone ( ) , test_msg. clone ( ) , None ) . unwrap ( ) ;
@@ -432,6 +446,7 @@ fn many_hops() {
432446 let path = OnionMessagePath {
433447 intermediate_nodes,
434448 destination : Destination :: Node ( nodes[ num_nodes-1 ] . get_node_pk ( ) ) ,
449+ addresses : None ,
435450 } ;
436451 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
437452 nodes[ num_nodes-1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
0 commit comments