@@ -223,7 +223,7 @@ fn two_unblinded_two_blinded() {
223223 let test_msg = OnionMessageContents :: Custom ( TestCustomMessage :: Response ) ;
224224
225225 let secp_ctx = Secp256k1 :: new ( ) ;
226- let blinded_path = BlindedPath :: new ( & [ nodes[ 3 ] . get_node_pk ( ) , nodes[ 4 ] . get_node_pk ( ) ] , & * nodes[ 4 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
226+ let blinded_path = BlindedPath :: without_id ( & [ nodes[ 3 ] . get_node_pk ( ) , nodes[ 4 ] . get_node_pk ( ) ] , & * nodes[ 4 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
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 ) ;
@@ -236,7 +236,7 @@ fn three_blinded_hops() {
236236 let test_msg = OnionMessageContents :: Custom ( TestCustomMessage :: Response ) ;
237237
238238 let secp_ctx = Secp256k1 :: new ( ) ;
239- 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 ( ) ;
239+ 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 ( ) ;
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 ) ;
@@ -263,14 +263,14 @@ fn we_are_intro_node() {
263263 let test_msg = TestCustomMessage :: Response ;
264264
265265 let secp_ctx = Secp256k1 :: new ( ) ;
266- 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 ( ) ;
266+ 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 ( ) ;
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 ) ;
270270 pass_along_path ( & nodes) ;
271271
272272 // Try with a two-hop blinded path where we are the introduction node.
273- let blinded_path = BlindedPath :: new ( & [ nodes[ 0 ] . get_node_pk ( ) , nodes[ 1 ] . get_node_pk ( ) ] , & * nodes[ 1 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
273+ let blinded_path = BlindedPath :: without_id ( & [ 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 ) ;
@@ -285,13 +285,13 @@ fn invalid_blinded_path_error() {
285285
286286 // 0 hops
287287 let secp_ctx = Secp256k1 :: new ( ) ;
288- let mut blinded_path = BlindedPath :: new ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
288+ let mut blinded_path = BlindedPath :: without_id ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
289289 blinded_path. blinded_hops . clear ( ) ;
290290 let err = nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg. clone ( ) ) , None ) . unwrap_err ( ) ;
291291 assert_eq ! ( err, SendError :: TooFewBlindedHops ) ;
292292
293293 // 1 hop
294- let mut blinded_path = BlindedPath :: new ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
294+ let mut blinded_path = BlindedPath :: without_id ( & [ nodes[ 1 ] . get_node_pk ( ) , nodes[ 2 ] . get_node_pk ( ) ] , & * nodes[ 2 ] . keys_manager , & secp_ctx) . unwrap ( ) ;
295295 blinded_path. blinded_hops . remove ( 0 ) ;
296296 assert_eq ! ( blinded_path. blinded_hops. len( ) , 1 ) ;
297297 let err = nodes[ 0 ] . messenger . send_onion_message ( & [ ] , Destination :: BlindedPath ( blinded_path) , OnionMessageContents :: Custom ( test_msg) , None ) . unwrap_err ( ) ;
@@ -305,7 +305,7 @@ fn reply_path() {
305305 let secp_ctx = Secp256k1 :: new ( ) ;
306306
307307 // Destination::Node
308- 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 ( ) ;
308+ 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 ( ) ;
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 ) ;
311311 pass_along_path ( & nodes) ;
@@ -315,8 +315,8 @@ fn reply_path() {
315315 pass_along_path ( & nodes) ;
316316
317317 // Destination::BlindedPath
318- 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 ( ) ;
319- 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 ( ) ;
318+ 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 ( ) ;
319+ 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 ( ) ;
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 ) ;
0 commit comments