@@ -358,7 +358,7 @@ fn one_blinded_hop() {
358358 let test_msg = TestCustomMessage :: Pong ;
359359
360360 let secp_ctx = Secp256k1 :: new ( ) ;
361- let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id ] , & * nodes[ 1 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
361+ let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id ] , None , & * nodes[ 1 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
362362 let destination = Destination :: BlindedPath ( blinded_path) ;
363363 nodes[ 0 ] . messenger . send_onion_message ( test_msg, destination, None ) . unwrap ( ) ;
364364 nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Pong ) ;
@@ -371,7 +371,7 @@ fn two_unblinded_two_blinded() {
371371 let test_msg = TestCustomMessage :: Pong ;
372372
373373 let secp_ctx = Secp256k1 :: new ( ) ;
374- let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 3 ] . node_id , nodes[ 4 ] . node_id ] , & * nodes[ 4 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
374+ let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 3 ] . node_id , nodes[ 4 ] . node_id ] , None , & * nodes[ 4 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
375375 let path = OnionMessagePath {
376376 intermediate_nodes : vec ! [ nodes[ 1 ] . node_id, nodes[ 2 ] . node_id] ,
377377 destination : Destination :: BlindedPath ( blinded_path) ,
@@ -389,7 +389,7 @@ fn three_blinded_hops() {
389389 let test_msg = TestCustomMessage :: Pong ;
390390
391391 let secp_ctx = Secp256k1 :: new ( ) ;
392- let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id , nodes[ 3 ] . node_id ] , & * nodes[ 3 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
392+ let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id , nodes[ 3 ] . node_id ] , None , & * nodes[ 3 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
393393 let destination = Destination :: BlindedPath ( blinded_path) ;
394394
395395 nodes[ 0 ] . messenger . send_onion_message ( test_msg, destination, None ) . unwrap ( ) ;
@@ -412,7 +412,7 @@ fn async_response_over_one_blinded_hop() {
412412
413413 // 3. Simulate the creation of a Blinded Reply path provided by Bob.
414414 let secp_ctx = Secp256k1 :: new ( ) ;
415- let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id ] , & * nodes[ 1 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
415+ let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id ] , None , & * nodes[ 1 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
416416
417417 // 4. Create a responder using the reply path for Alice.
418418 let responder = Some ( Responder :: new ( reply_path, path_id) ) ;
@@ -448,7 +448,9 @@ fn async_response_with_reply_path_succeeds() {
448448 // Alice receives a message from Bob with an added reply_path for responding back.
449449 let message = TestCustomMessage :: Ping ;
450450 let path_id = Some ( [ 2 ; 32 ] ) ;
451- let reply_path = BlindedPath :: new_for_message ( & [ bob. node_id ] , & * bob. entropy_source , & secp_ctx) . unwrap ( ) ;
451+
452+ let secp_ctx = Secp256k1 :: new ( ) ;
453+ let reply_path = BlindedPath :: new_for_message ( & [ bob. node_id ] , None , & * bob. entropy_source , & secp_ctx) . unwrap ( ) ;
452454
453455 // Alice asynchronously responds to Bob, expecting a response back from him.
454456 let responder = Responder :: new ( reply_path, path_id) ;
@@ -485,7 +487,7 @@ fn async_response_with_reply_path_fails() {
485487 // Alice receives a message from Bob with an added reply_path for responding back.
486488 let message = TestCustomMessage :: Ping ;
487489 let path_id = Some ( [ 2 ; 32 ] ) ;
488- let reply_path = BlindedPath :: new_for_message ( & [ bob. node_id ] , & * bob. entropy_source , & secp_ctx) . unwrap ( ) ;
490+ let reply_path = BlindedPath :: new_for_message ( & [ bob. node_id ] , None , & * bob. entropy_source , & secp_ctx) . unwrap ( ) ;
489491
490492 // Alice tries to asynchronously respond to Bob, but fails because the nodes are unannounced.
491493 // Therefore, the reply_path cannot be used for the response.
@@ -524,15 +526,15 @@ fn we_are_intro_node() {
524526 let test_msg = TestCustomMessage :: Pong ;
525527
526528 let secp_ctx = Secp256k1 :: new ( ) ;
527- let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 0 ] . node_id , nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , & * nodes[ 2 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
529+ let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 0 ] . node_id , nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , None , & * nodes[ 2 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
528530 let destination = Destination :: BlindedPath ( blinded_path) ;
529531
530532 nodes[ 0 ] . messenger . send_onion_message ( test_msg. clone ( ) , destination, None ) . unwrap ( ) ;
531533 nodes[ 2 ] . custom_message_handler . expect_message ( TestCustomMessage :: Pong ) ;
532534 pass_along_path ( & nodes) ;
533535
534536 // Try with a two-hop blinded path where we are the introduction node.
535- let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 0 ] . node_id , nodes[ 1 ] . node_id ] , & * nodes[ 1 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
537+ let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 0 ] . node_id , nodes[ 1 ] . node_id ] , None , & * nodes[ 1 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
536538 let destination = Destination :: BlindedPath ( blinded_path) ;
537539 nodes[ 0 ] . messenger . send_onion_message ( test_msg, destination, None ) . unwrap ( ) ;
538540 nodes[ 1 ] . custom_message_handler . expect_message ( TestCustomMessage :: Pong ) ;
@@ -547,7 +549,7 @@ fn invalid_blinded_path_error() {
547549 let test_msg = TestCustomMessage :: Pong ;
548550
549551 let secp_ctx = Secp256k1 :: new ( ) ;
550- let mut blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , & * nodes[ 2 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
552+ let mut blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , None , & * nodes[ 2 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
551553 blinded_path. blinded_hops . clear ( ) ;
552554 let destination = Destination :: BlindedPath ( blinded_path) ;
553555 let err = nodes[ 0 ] . messenger . send_onion_message ( test_msg, destination, None ) . unwrap_err ( ) ;
@@ -566,7 +568,7 @@ fn reply_path() {
566568 destination : Destination :: Node ( nodes[ 3 ] . node_id ) ,
567569 first_node_addresses : None ,
568570 } ;
569- let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 2 ] . node_id , nodes[ 1 ] . node_id , nodes[ 0 ] . node_id ] , & * nodes[ 0 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
571+ let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 2 ] . node_id , nodes[ 1 ] . node_id , nodes[ 0 ] . node_id ] , None , & * nodes[ 0 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
570572 nodes[ 0 ] . messenger . send_onion_message_using_path ( path, test_msg. clone ( ) , Some ( reply_path) ) . unwrap ( ) ;
571573 nodes[ 3 ] . custom_message_handler . expect_message ( TestCustomMessage :: Ping ) ;
572574 pass_along_path ( & nodes) ;
@@ -576,9 +578,9 @@ fn reply_path() {
576578 pass_along_path ( & nodes) ;
577579
578580 // Destination::BlindedPath
579- let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id , nodes[ 3 ] . node_id ] , & * nodes[ 3 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
581+ let blinded_path = BlindedPath :: new_for_message ( & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id , nodes[ 3 ] . node_id ] , None , & * nodes[ 3 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
580582 let destination = Destination :: BlindedPath ( blinded_path) ;
581- let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 2 ] . node_id , nodes[ 1 ] . node_id , nodes[ 0 ] . node_id ] , & * nodes[ 0 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
583+ let reply_path = BlindedPath :: new_for_message ( & [ nodes[ 2 ] . node_id , nodes[ 1 ] . node_id , nodes[ 0 ] . node_id ] , None , & * nodes[ 0 ] . entropy_source , & secp_ctx) . unwrap ( ) ;
582584
583585 nodes[ 0 ] . messenger . send_onion_message ( test_msg, destination, Some ( reply_path) ) . unwrap ( ) ;
584586 nodes[ 3 ] . custom_message_handler . expect_message ( TestCustomMessage :: Ping ) ;
@@ -659,7 +661,7 @@ fn requests_peer_connection_for_buffered_messages() {
659661 add_channel_to_graph ( & nodes[ 0 ] , & nodes[ 1 ] , & secp_ctx, 42 ) ;
660662
661663 let blinded_path = BlindedPath :: new_for_message (
662- & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , & * nodes[ 0 ] . entropy_source , & secp_ctx
664+ & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , None , & * nodes[ 0 ] . entropy_source , & secp_ctx
663665 ) . unwrap ( ) ;
664666 let destination = Destination :: BlindedPath ( blinded_path) ;
665667
@@ -696,7 +698,7 @@ fn drops_buffered_messages_waiting_for_peer_connection() {
696698 add_channel_to_graph ( & nodes[ 0 ] , & nodes[ 1 ] , & secp_ctx, 42 ) ;
697699
698700 let blinded_path = BlindedPath :: new_for_message (
699- & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , & * nodes[ 0 ] . entropy_source , & secp_ctx
701+ & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , None , & * nodes[ 0 ] . entropy_source , & secp_ctx
700702 ) . unwrap ( ) ;
701703 let destination = Destination :: BlindedPath ( blinded_path) ;
702704
@@ -745,7 +747,7 @@ fn intercept_offline_peer_oms() {
745747 let message = TestCustomMessage :: Pong ;
746748 let secp_ctx = Secp256k1 :: new ( ) ;
747749 let blinded_path = BlindedPath :: new_for_message (
748- & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , & * nodes[ 2 ] . entropy_source , & secp_ctx
750+ & [ nodes[ 1 ] . node_id , nodes[ 2 ] . node_id ] , None , & * nodes[ 2 ] . entropy_source , & secp_ctx
749751 ) . unwrap ( ) ;
750752 let destination = Destination :: BlindedPath ( blinded_path) ;
751753
0 commit comments