Skip to content

Commit 56b4637

Browse files
committed
temp mpp test mod to have single route
1 parent e594123 commit 56b4637

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lightning/src/ln/payment_tests.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
//! Tests that test the payment retry logic in ChannelManager, including various edge-cases around
1111
//! serialization ordering between ChannelManager/ChannelMonitors and ensuring we can still retry
1212
//! payments thereafter.
13-
1413
use crate::chain::channelmonitor::{
1514
ANTI_REORG_DELAY, HTLC_FAIL_BACK_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS,
1615
};
@@ -493,15 +492,15 @@ fn test_mpp_keysend() {
493492
let nodes = create_network(4, &node_cfgs, &node_chanmgrs);
494493

495494
let node_b_id = nodes[1].node.get_our_node_id();
496-
let node_c_id = nodes[2].node.get_our_node_id();
495+
// let node_c_id = nodes[2].node.get_our_node_id();
497496
let node_d_id = nodes[3].node.get_our_node_id();
498497

499498
create_announced_chan_between_nodes(&nodes, 0, 1);
500-
create_announced_chan_between_nodes(&nodes, 0, 2);
499+
// create_announced_chan_between_nodes(&nodes, 0, 2);
501500
create_announced_chan_between_nodes(&nodes, 1, 3);
502-
create_announced_chan_between_nodes(&nodes, 2, 3);
501+
// create_announced_chan_between_nodes(&nodes, 2, 3);
503502

504-
let recv_value = 15_000_000;
503+
let recv_value = 5_000_000;
505504
let route_params = RouteParameters::from_payment_params_and_value(
506505
PaymentParameters::for_keysend(node_d_id, 40, true),
507506
recv_value,
@@ -514,18 +513,19 @@ fn test_mpp_keysend() {
514513
let id = PaymentId([42; 32]);
515514
let hash =
516515
nodes[0].node.send_spontaneous_payment(preimage, onion, id, route_params, retry).unwrap();
517-
check_added_monitors!(nodes[0], 2);
516+
check_added_monitors!(nodes[0], 1);
518517

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

523522
let ev = remove_first_msg_event_to_node(&node_b_id, &mut events);
524523
let payment_secret = Some(payment_secret);
525-
pass_along_path(&nodes[0], route[0], recv_value, hash, payment_secret, ev, false, preimage);
524+
pass_along_path(&nodes[0], route[0], recv_value, hash, payment_secret, ev, true, preimage);
525+
526+
#[cfg(feature = "std")]
527+
std::thread::sleep(Duration::from_millis(50));
526528

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);
529529
claim_payment_along_route(ClaimAlongRouteArgs::new(&nodes[0], route, preimage.unwrap()));
530530
}
531531

0 commit comments

Comments
 (0)