Skip to content

Commit 9e75af3

Browse files
committed
temp mpp test mod to have single route
1 parent e69b9f9 commit 9e75af3

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lightning/src/ln/payment_tests.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -493,15 +493,15 @@ fn test_mpp_keysend() {
493493
let nodes = create_network(4, &node_cfgs, &node_chanmgrs);
494494

495495
let node_b_id = nodes[1].node.get_our_node_id();
496-
let node_c_id = nodes[2].node.get_our_node_id();
496+
// let node_c_id = nodes[2].node.get_our_node_id();
497497
let node_d_id = nodes[3].node.get_our_node_id();
498498

499499
create_announced_chan_between_nodes(&nodes, 0, 1);
500-
create_announced_chan_between_nodes(&nodes, 0, 2);
500+
// create_announced_chan_between_nodes(&nodes, 0, 2);
501501
create_announced_chan_between_nodes(&nodes, 1, 3);
502-
create_announced_chan_between_nodes(&nodes, 2, 3);
502+
// create_announced_chan_between_nodes(&nodes, 2, 3);
503503

504-
let recv_value = 15_000_000;
504+
let recv_value = 5_000_000;
505505
let route_params = RouteParameters::from_payment_params_and_value(
506506
PaymentParameters::for_keysend(node_d_id, 40, true),
507507
recv_value,
@@ -514,18 +514,16 @@ fn test_mpp_keysend() {
514514
let id = PaymentId([42; 32]);
515515
let hash =
516516
nodes[0].node.send_spontaneous_payment(preimage, onion, id, route_params, retry).unwrap();
517-
check_added_monitors!(nodes[0], 2);
517+
check_added_monitors!(nodes[0], 1);
518518

519-
let route: &[&[&Node]] = &[&[&nodes[1], &nodes[3]], &[&nodes[2], &nodes[3]]];
519+
let route: &[&[&Node]] = &[&[&nodes[1], &nodes[3]]];
520520
let mut events = nodes[0].node.get_and_clear_pending_msg_events();
521-
assert_eq!(events.len(), 2);
521+
assert_eq!(events.len(), 1);
522522

523523
let ev = remove_first_msg_event_to_node(&node_b_id, &mut events);
524524
let payment_secret = Some(payment_secret);
525-
pass_along_path(&nodes[0], route[0], recv_value, hash, payment_secret, ev, false, preimage);
525+
pass_along_path(&nodes[0], route[0], recv_value, hash, payment_secret, ev, true, preimage);
526526

527-
let ev = remove_first_msg_event_to_node(&node_c_id, &mut events);
528-
pass_along_path(&nodes[0], route[1], recv_value, hash, payment_secret, ev, true, preimage);
529527
claim_payment_along_route(ClaimAlongRouteArgs::new(&nodes[0], route, preimage.unwrap()));
530528
}
531529

0 commit comments

Comments
 (0)