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