@@ -222,7 +222,7 @@ fn two_unblinded_two_blinded() {
222222 let test_msg = OnionMessageContents :: Custom ( TestCustomMessage :: Response ) ;
223223
224224 let secp_ctx = Secp256k1 :: new ( ) ;
225- let blinded_path = BlindedPath :: new ( & [ nodes[ 3 ] . get_node_pk ( ) , nodes[ 4 ] . get_node_pk ( ) ] , & * nodes[ 4 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
225+ let blinded_path = BlindedPath :: without_id ( & [ nodes[ 3 ] . get_node_pk ( ) , nodes[ 4 ] . get_node_pk ( ) ] , & * nodes[ 4 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
226226
227227 nodes[ 0 ] . messenger . send_onion_message ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , Destination :: BlindedPath ( blinded_path) , test_msg, None ) . unwrap ( ) ;
228228 nodes[ 4 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -235,7 +235,7 @@ fn three_blinded_hops() {
235235 let test_msg = OnionMessageContents :: Custom ( TestCustomMessage :: Response ) ;
236236
237237 let secp_ctx = Secp256k1 :: new ( ) ;
238- 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 ( ) ;
238+ let blinded_path = BlindedPath :: without_id ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) , nodes[ 3 ] . get_node_pk ( ) ] , & * nodes[ 3 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
239239
240240 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , test_msg, None ) . unwrap ( ) ;
241241 nodes[ 3 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
@@ -262,14 +262,14 @@ fn we_are_intro_node() {
262262 let test_msg = TestCustomMessage :: Response ;
263263
264264 let secp_ctx = Secp256k1 :: new ( ) ;
265- let blinded_path = BlindedPath :: new ( & [ nodes[ 0 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
265+ let blinded_path = BlindedPath :: without_id ( & [ nodes[ 0 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
266266
267267 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg. clone ( ) ) , None ) . unwrap ( ) ;
268268 nodes[ 2 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
269269 pass_along_path ( & nodes) ;
270270
271271 // Try with a two-hop blinded path where we are the introduction node.
272- let blinded_path = BlindedPath :: new ( & [ nodes[ 0 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) ] , & * nodes[ 1 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
272+ let blinded_path = BlindedPath :: without_id ( & [ nodes[ 0 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) ] , & * nodes[ 1 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
273273 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg) , None ) . unwrap ( ) ;
274274 nodes[ 1 ] . custom_handler . expect_message ( TestCustomMessage :: Response ) ;
275275 nodes. remove ( 2 ) ;
@@ -284,13 +284,13 @@ fn invalid_blinded_path_error() {
284284
285285 // 0 hops
286286 let secp_ctx = Secp256k1 :: new ( ) ;
287- let mut blinded_path = BlindedPath :: new ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
287+ let mut blinded_path = BlindedPath :: without_id ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
288288 blinded_path. blinded_hops . clear ( ) ;
289289 let err = nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg. clone ( ) ) , None ) . unwrap_err ( ) ;
290290 assert_eq ! ( err, SendError :: TooFewBlindedHops ) ;
291291
292292 // 1 hop
293- let mut blinded_path = BlindedPath :: new ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
293+ let mut blinded_path = BlindedPath :: without_id ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
294294 blinded_path. blinded_hops . remove ( 0 ) ;
295295 assert_eq ! ( blinded_path. blinded_hops. len( ) , 1 ) ;
296296 let err = nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg) , None ) . unwrap_err ( ) ;
@@ -304,7 +304,7 @@ fn reply_path() {
304304 let secp_ctx = Secp256k1 :: new ( ) ;
305305
306306 // Destination::Node
307- 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 ( ) ;
307+ let reply_path = BlindedPath :: without_id ( & [ nodes[ 2 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 0 ] . get_node_pk ( ) ] , & * nodes[ 0 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
308308 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 ( ) ;
309309 nodes[ 3 ] . custom_handler . expect_message ( TestCustomMessage :: Request ) ;
310310 pass_along_path ( & nodes) ;
@@ -314,8 +314,8 @@ fn reply_path() {
314314 pass_along_path ( & nodes) ;
315315
316316 // Destination::BlindedPath
317- 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 ( ) ;
318- 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 ( ) ;
317+ let blinded_path = BlindedPath :: without_id ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) , nodes[ 3 ] . get_node_pk ( ) ] , & * nodes[ 3 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
318+ let reply_path = BlindedPath :: without_id ( & [ nodes[ 2 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) , nodes[ 0 ] . get_node_pk ( ) ] , & * nodes[ 0 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
319319
320320 nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg) , Some ( reply_path) ) . unwrap ( ) ;
321321 nodes[ 3 ] . custom_handler . expect_message ( TestCustomMessage :: Request ) ;
0 commit comments