@@ -5536,16 +5536,16 @@ mod tests {
5536
5536
5537
5537
#[ test]
5538
5538
fn builds_correct_path_from_hops ( ) {
5539
- let ( secp_ctx, network, _, _, logger) = build_line_graph ( ) ;
5539
+ let ( secp_ctx, network, _, _, logger) = build_graph ( ) ;
5540
5540
let ( _, our_id, _, nodes) = get_nodes ( & secp_ctx) ;
5541
5541
let network_graph = network. read_only ( ) ;
5542
5542
5543
5543
let keys_manager = test_utils:: TestKeysInterface :: new ( & [ 0u8 ; 32 ] , Network :: Testnet ) ;
5544
5544
let random_seed_bytes = keys_manager. get_secure_random_bytes ( ) ;
5545
5545
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,
5549
5549
& network_graph, 100 , 0 , Arc :: clone ( & logger) , & random_seed_bytes) . unwrap ( ) ;
5550
5550
let route_hop_pubkeys = route. paths [ 0 ] . iter ( ) . map ( |hop| hop. pubkey ) . collect :: < Vec < _ > > ( ) ;
5551
5551
assert_eq ! ( hops. len( ) , route. paths[ 0 ] . len( ) ) ;
0 commit comments