@@ -1539,13 +1539,11 @@ mod test {
1539
1539
}
1540
1540
1541
1541
#[ cfg( feature = "std" ) ]
1542
- fn match_multi_node_invoice_routes < ' a , ' b : ' a , ' c : ' b > (
1542
+ fn create_multi_node_invoice < ' a , ' b : ' a , ' c : ' b > (
1543
1543
invoice_amt : Option < u64 > ,
1544
1544
invoice_node : & Node < ' a , ' b , ' c > ,
1545
1545
network_multi_nodes : Vec < & Node < ' a , ' b , ' c > > ,
1546
- mut chan_ids_to_match : HashSet < u64 > ,
1547
- nodes_contains_public_channels : bool
1548
- ) {
1546
+ ) -> ( crate :: utils:: Invoice , HashSet < u64 > ) {
1549
1547
let phantom_route_hints = network_multi_nodes. iter ( )
1550
1548
. map ( |node| node. node . get_phantom_route_hints ( ) )
1551
1549
. collect :: < Vec < PhantomRouteHints > > ( ) ;
@@ -1558,9 +1556,20 @@ mod test {
1558
1556
3600 , phantom_route_hints, & invoice_node. keys_manager , & invoice_node. keys_manager ,
1559
1557
& invoice_node. logger , Currency :: BitcoinTestnet , None , Duration :: from_secs ( 1234567 ) ) . unwrap ( ) ;
1560
1558
1561
- let invoice_hints = invoice. private_routes ( ) ;
1559
+ ( invoice, phantom_scids)
1560
+ }
1561
+
1562
+ #[ cfg( feature = "std" ) ]
1563
+ fn match_multi_node_invoice_routes < ' a , ' b : ' a , ' c : ' b > (
1564
+ invoice_amt : Option < u64 > ,
1565
+ invoice_node : & Node < ' a , ' b , ' c > ,
1566
+ network_multi_nodes : Vec < & Node < ' a , ' b , ' c > > ,
1567
+ mut chan_ids_to_match : HashSet < u64 > ,
1568
+ nodes_contains_public_channels : bool
1569
+ ) {
1570
+ let ( invoice, phantom_scids) = create_multi_node_invoice ( invoice_amt, invoice_node, network_multi_nodes) ;
1562
1571
1563
- for hint in invoice_hints {
1572
+ for hint in invoice . private_routes ( ) {
1564
1573
let hints = & ( hint. 0 ) . 0 ;
1565
1574
match hints. len ( ) {
1566
1575
1 => {
0 commit comments