@@ -55,6 +55,7 @@ impl MessageRouter for TestMessageRouter {
55
55
Ok ( OnionMessagePath {
56
56
intermediate_nodes : vec ! [ ] ,
57
57
destination,
58
+ addresses : None ,
58
59
} )
59
60
}
60
61
}
@@ -205,6 +206,7 @@ fn one_unblinded_hop() {
205
206
let path = OnionMessagePath {
206
207
intermediate_nodes : vec ! [ ] ,
207
208
destination : Destination :: Node ( nodes[ 1 ] . get_node_pk ( ) ) ,
209
+ addresses : None ,
208
210
} ;
209
211
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
210
212
nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -219,6 +221,7 @@ fn two_unblinded_hops() {
219
221
let path = OnionMessagePath {
220
222
intermediate_nodes : vec ! [ nodes[ 1 ] . get_node_pk( ) ] ,
221
223
destination : Destination :: Node ( nodes[ 2 ] . get_node_pk ( ) ) ,
224
+ addresses : None ,
222
225
} ;
223
226
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
224
227
nodes[ 2 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -235,6 +238,7 @@ fn one_blinded_hop() {
235
238
let path = OnionMessagePath {
236
239
intermediate_nodes : vec ! [ ] ,
237
240
destination : Destination :: BlindedPath ( blinded_path) ,
241
+ addresses : None ,
238
242
} ;
239
243
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
240
244
nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -251,6 +255,7 @@ fn two_unblinded_two_blinded() {
251
255
let path = OnionMessagePath {
252
256
intermediate_nodes : vec ! [ nodes[ 1 ] . get_node_pk( ) , nodes[ 2 ] . get_node_pk( ) ] ,
253
257
destination : Destination :: BlindedPath ( blinded_path) ,
258
+ addresses : None ,
254
259
} ;
255
260
256
261
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
@@ -268,6 +273,7 @@ fn three_blinded_hops() {
268
273
let path = OnionMessagePath {
269
274
intermediate_nodes : vec ! [ ] ,
270
275
destination : Destination :: BlindedPath ( blinded_path) ,
276
+ addresses : None ,
271
277
} ;
272
278
273
279
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
@@ -286,6 +292,7 @@ fn too_big_packet_error() {
286
292
let path = OnionMessagePath {
287
293
intermediate_nodes : hops,
288
294
destination : Destination :: Node ( hop_node_id) ,
295
+ addresses : None ,
289
296
} ;
290
297
let err = nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap_err ( ) ;
291
298
assert_eq ! ( err, SendError :: TooBigPacket ) ;
@@ -303,6 +310,7 @@ fn we_are_intro_node() {
303
310
let path = OnionMessagePath {
304
311
intermediate_nodes : vec ! [ ] ,
305
312
destination : Destination :: BlindedPath ( blinded_path) ,
313
+ addresses : None ,
306
314
} ;
307
315
308
316
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg. clone ( ) , None ) . unwrap ( ) ;
@@ -314,6 +322,7 @@ fn we_are_intro_node() {
314
322
let path = OnionMessagePath {
315
323
intermediate_nodes : vec ! [ ] ,
316
324
destination : Destination :: BlindedPath ( blinded_path) ,
325
+ addresses : None ,
317
326
} ;
318
327
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
319
328
nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -334,6 +343,7 @@ fn invalid_blinded_path_error() {
334
343
let path = OnionMessagePath {
335
344
intermediate_nodes : vec ! [ ] ,
336
345
destination : Destination :: BlindedPath ( blinded_path) ,
346
+ addresses : None ,
337
347
} ;
338
348
let err = nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg. clone ( ) , None ) . unwrap_err ( ) ;
339
349
assert_eq ! ( err, SendError :: TooFewBlindedHops ) ;
@@ -349,6 +359,7 @@ fn reply_path() {
349
359
let path = OnionMessagePath {
350
360
intermediate_nodes : vec ! [ nodes[ 1 ] . get_node_pk( ) , nodes[ 2 ] . get_node_pk( ) ] ,
351
361
destination : Destination :: Node ( nodes[ 3 ] . get_node_pk ( ) ) ,
362
+ addresses : None ,
352
363
} ;
353
364
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 ( ) ;
354
365
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg. clone ( ) , Some ( reply_path) ) . unwrap ( ) ;
@@ -364,6 +375,7 @@ fn reply_path() {
364
375
let path = OnionMessagePath {
365
376
intermediate_nodes : vec ! [ ] ,
366
377
destination : Destination :: BlindedPath ( blinded_path) ,
378
+ addresses : None ,
367
379
} ;
368
380
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 ( ) ;
369
381
@@ -398,6 +410,7 @@ fn invalid_custom_message_type() {
398
410
let path = OnionMessagePath {
399
411
intermediate_nodes : vec ! [ ] ,
400
412
destination : Destination :: Node ( nodes[ 1 ] . get_node_pk ( ) ) ,
413
+ addresses : None ,
401
414
} ;
402
415
let err = nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap_err ( ) ;
403
416
assert_eq ! ( err, SendError :: InvalidMessage ) ;
@@ -410,6 +423,7 @@ fn peer_buffer_full() {
410
423
let path = OnionMessagePath {
411
424
intermediate_nodes : vec ! [ ] ,
412
425
destination : Destination :: Node ( nodes[ 1 ] . get_node_pk ( ) ) ,
426
+ addresses : None ,
413
427
} ;
414
428
for _ in 0 ..188 { // Based on MAX_PER_PEER_BUFFER_SIZE in OnionMessenger
415
429
nodes[ 0 ] . messenger . send_onion_message_using_path ( path. clone ( ) , test_msg. clone ( ) , None ) . unwrap ( ) ;
@@ -434,6 +448,7 @@ fn many_hops() {
434
448
let path = OnionMessagePath {
435
449
intermediate_nodes,
436
450
destination : Destination :: Node ( nodes[ num_nodes-1 ] . get_node_pk ( ) ) ,
451
+ addresses : None ,
437
452
} ;
438
453
nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg, None ) . unwrap ( ) ;
439
454
nodes[ num_nodes-1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Response ) ;
0 commit comments