@@ -5536,16 +5536,16 @@ mod tests {
55365536
55375537 #[ test]
55385538 fn builds_correct_path_from_hops ( ) {
5539- let ( secp_ctx, network, _, _, logger) = build_line_graph ( ) ;
5539+ let ( secp_ctx, network, _, _, logger) = build_graph ( ) ;
55405540 let ( _, our_id, _, nodes) = get_nodes ( & secp_ctx) ;
55415541 let network_graph = network. read_only ( ) ;
55425542
55435543 let keys_manager = test_utils:: TestKeysInterface :: new ( & [ 0u8 ; 32 ] , Network :: Testnet ) ;
55445544 let random_seed_bytes = keys_manager. get_secure_random_bytes ( ) ;
55455545
5546- let payment_params = PaymentParameters :: from_node_id ( nodes[ 18 ] ) ;
5547- let hops = & nodes[ .. 19 ] ;
5548- let route = build_route_from_hops_internal ( & our_id, hops, & payment_params,
5546+ let payment_params = PaymentParameters :: from_node_id ( nodes[ 3 ] ) ;
5547+ let hops = [ nodes[ 1 ] , nodes [ 2 ] , nodes [ 4 ] , nodes [ 3 ] ] ;
5548+ let route = build_route_from_hops_internal ( & our_id, & hops, & payment_params,
55495549 & network_graph, 100 , 0 , Arc :: clone ( & logger) , & random_seed_bytes) . unwrap ( ) ;
55505550 let route_hop_pubkeys = route. paths [ 0 ] . iter ( ) . map ( |hop| hop. pubkey ) . collect :: < Vec < _ > > ( ) ;
55515551 assert_eq ! ( hops. len( ) , route. paths[ 0 ] . len( ) ) ;
0 commit comments