Skip to content

Commit d795e24

Browse files
authored
Merge pull request #2641 from alexanderwiederin/2585-preflight-test-coverage
#2585 Preflight Test Coverage
2 parents 415cbf0 + a38bdbe commit d795e24

File tree

3 files changed

+168
-102
lines changed

3 files changed

+168
-102
lines changed

lightning/src/ln/functional_test_utils.rs

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,26 @@ pub fn expect_channel_ready_event<'a, 'b, 'c, 'd>(node: &'a Node<'b, 'c, 'd>, ex
21422142
}
21432143
}
21442144

2145+
#[cfg(any(test, feature = "_test_utils"))]
2146+
pub fn expect_probe_successful_events(node: &Node, mut probe_results: Vec<(PaymentHash, PaymentId)>) {
2147+
let mut events = node.node.get_and_clear_pending_events();
2148+
2149+
for event in events.drain(..) {
2150+
match event {
2151+
Event::ProbeSuccessful { payment_hash: ev_ph, payment_id: ev_pid, ..} => {
2152+
let result_idx = probe_results.iter().position(|(payment_hash, payment_id)| *payment_hash == ev_ph && *payment_id == ev_pid);
2153+
assert!(result_idx.is_some());
2154+
2155+
probe_results.remove(result_idx.unwrap());
2156+
},
2157+
_ => panic!(),
2158+
}
2159+
};
2160+
2161+
// Ensure that we received a ProbeSuccessful event for each probe result.
2162+
assert!(probe_results.is_empty());
2163+
}
2164+
21452165
pub struct PaymentFailedConditions<'a> {
21462166
pub(crate) expected_htlc_error_data: Option<(u16, &'a [u8])>,
21472167
pub(crate) expected_blamed_scid: Option<u64>,
@@ -2279,21 +2299,41 @@ pub fn send_along_route_with_secret<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>,
22792299
payment_id
22802300
}
22812301

2282-
pub fn do_pass_along_path<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_path: &[&Node<'a, 'b, 'c>], recv_value: u64, our_payment_hash: PaymentHash, our_payment_secret: Option<PaymentSecret>, ev: MessageSendEvent, payment_claimable_expected: bool, clear_recipient_events: bool, expected_preimage: Option<PaymentPreimage>) -> Option<Event> {
2302+
fn fail_payment_along_path<'a, 'b, 'c>(expected_path: &[&Node<'a, 'b, 'c>]) {
2303+
let origin_node_id = expected_path[0].node.get_our_node_id();
2304+
2305+
// iterate from the receiving node to the origin node and handle update fail htlc.
2306+
for (&node, &prev_node) in expected_path.iter().rev().zip(expected_path.iter().rev().skip(1)) {
2307+
let updates = get_htlc_update_msgs!(node, prev_node.node.get_our_node_id());
2308+
prev_node.node.handle_update_fail_htlc(&node.node.get_our_node_id(), &updates.update_fail_htlcs[0]);
2309+
check_added_monitors!(prev_node, 0);
2310+
2311+
let is_first_hop = origin_node_id == prev_node.node.get_our_node_id();
2312+
// We do not want to fail backwards on the first hop. All other hops should fail backwards.
2313+
commitment_signed_dance!(prev_node, node, updates.commitment_signed, !is_first_hop);
2314+
}
2315+
}
2316+
2317+
pub fn do_pass_along_path<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_path: &[&Node<'a, 'b, 'c>], recv_value: u64, our_payment_hash: PaymentHash, our_payment_secret: Option<PaymentSecret>, ev: MessageSendEvent, payment_claimable_expected: bool, clear_recipient_events: bool, expected_preimage: Option<PaymentPreimage>, is_probe: bool) -> Option<Event> {
22832318
let mut payment_event = SendEvent::from_event(ev);
22842319
let mut prev_node = origin_node;
22852320
let mut event = None;
22862321

22872322
for (idx, &node) in expected_path.iter().enumerate() {
2323+
let is_last_hop = idx == expected_path.len() - 1;
22882324
assert_eq!(node.node.get_our_node_id(), payment_event.node_id);
22892325

22902326
node.node.handle_update_add_htlc(&prev_node.node.get_our_node_id(), &payment_event.msgs[0]);
22912327
check_added_monitors!(node, 0);
2292-
commitment_signed_dance!(node, prev_node, payment_event.commitment_msg, false);
22932328

2294-
expect_pending_htlcs_forwardable!(node);
2329+
if is_last_hop && is_probe {
2330+
commitment_signed_dance!(node, prev_node, payment_event.commitment_msg, true, true);
2331+
} else {
2332+
commitment_signed_dance!(node, prev_node, payment_event.commitment_msg, false);
2333+
expect_pending_htlcs_forwardable!(node);
2334+
}
22952335

2296-
if idx == expected_path.len() - 1 && clear_recipient_events {
2336+
if is_last_hop && clear_recipient_events {
22972337
let events_2 = node.node.get_and_clear_pending_events();
22982338
if payment_claimable_expected {
22992339
assert_eq!(events_2.len(), 1);
@@ -2327,7 +2367,7 @@ pub fn do_pass_along_path<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_p
23272367
} else {
23282368
assert!(events_2.is_empty());
23292369
}
2330-
} else if idx != expected_path.len() - 1 {
2370+
} else if !is_last_hop {
23312371
let mut events_2 = node.node.get_and_clear_pending_msg_events();
23322372
assert_eq!(events_2.len(), 1);
23332373
check_added_monitors!(node, 1);
@@ -2341,16 +2381,33 @@ pub fn do_pass_along_path<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_p
23412381
}
23422382

23432383
pub fn pass_along_path<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_path: &[&Node<'a, 'b, 'c>], recv_value: u64, our_payment_hash: PaymentHash, our_payment_secret: Option<PaymentSecret>, ev: MessageSendEvent, payment_claimable_expected: bool, expected_preimage: Option<PaymentPreimage>) -> Option<Event> {
2344-
do_pass_along_path(origin_node, expected_path, recv_value, our_payment_hash, our_payment_secret, ev, payment_claimable_expected, true, expected_preimage)
2384+
do_pass_along_path(origin_node, expected_path, recv_value, our_payment_hash, our_payment_secret, ev, payment_claimable_expected, true, expected_preimage, false)
2385+
}
2386+
2387+
pub fn send_probe_along_route<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route: &[&[&Node<'a, 'b, 'c>]]) {
2388+
let mut events = origin_node.node.get_and_clear_pending_msg_events();
2389+
assert_eq!(events.len(), expected_route.len());
2390+
2391+
check_added_monitors!(origin_node, expected_route.len());
2392+
2393+
for path in expected_route.iter() {
2394+
let ev = remove_first_msg_event_to_node(&path[0].node.get_our_node_id(), &mut events);
2395+
2396+
do_pass_along_path(origin_node, path, 0, PaymentHash([0_u8; 32]), None, ev, false, false, None, true);
2397+
let nodes_to_fail_payment: Vec<_> = vec![origin_node].into_iter().chain(path.iter().cloned()).collect();
2398+
2399+
fail_payment_along_path(nodes_to_fail_payment.as_slice());
2400+
}
23452401
}
23462402

23472403
pub fn pass_along_route<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route: &[&[&Node<'a, 'b, 'c>]], recv_value: u64, our_payment_hash: PaymentHash, our_payment_secret: PaymentSecret) {
23482404
let mut events = origin_node.node.get_and_clear_pending_msg_events();
23492405
assert_eq!(events.len(), expected_route.len());
2406+
23502407
for (path_idx, expected_path) in expected_route.iter().enumerate() {
23512408
let ev = remove_first_msg_event_to_node(&expected_path[0].node.get_our_node_id(), &mut events);
23522409
// Once we've gotten through all the HTLCs, the last one should result in a
2353-
// PaymentClaimable (but each previous one should not!), .
2410+
// PaymentClaimable (but each previous one should not!).
23542411
let expect_payment = path_idx == expected_route.len() - 1;
23552412
pass_along_path(origin_node, expected_path, recv_value, our_payment_hash.clone(), Some(our_payment_secret), ev, expect_payment, None);
23562413
}

lightning/src/ln/payment_tests.rs

Lines changed: 102 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,48 +1278,17 @@ fn successful_probe_yields_event() {
12781278
create_announced_chan_between_nodes(&nodes, 0, 1);
12791279
create_announced_chan_between_nodes(&nodes, 1, 2);
12801280

1281-
let (route, _, _, _) = get_route_and_payment_hash!(&nodes[0], nodes[2], 100_000);
1281+
let recv_value = 100_000;
1282+
let (route, payment_hash, _, _) = get_route_and_payment_hash!(&nodes[0], nodes[2], recv_value);
12821283

1283-
let (payment_hash, payment_id) = nodes[0].node.send_probe(route.paths[0].clone()).unwrap();
1284+
let res = nodes[0].node.send_probe(route.paths[0].clone()).unwrap();
12841285

1285-
// node[0] -- update_add_htlcs -> node[1]
1286-
check_added_monitors!(nodes[0], 1);
1287-
let updates = get_htlc_update_msgs!(nodes[0], nodes[1].node.get_our_node_id());
1288-
let probe_event = SendEvent::from_commitment_update(nodes[1].node.get_our_node_id(), updates);
1289-
nodes[1].node.handle_update_add_htlc(&nodes[0].node.get_our_node_id(), &probe_event.msgs[0]);
1290-
check_added_monitors!(nodes[1], 0);
1291-
commitment_signed_dance!(nodes[1], nodes[0], probe_event.commitment_msg, false);
1292-
expect_pending_htlcs_forwardable!(nodes[1]);
1286+
let expected_route: &[&[&Node]] = &[&[&nodes[1], &nodes[2]]];
12931287

1294-
// node[1] -- update_add_htlcs -> node[2]
1295-
check_added_monitors!(nodes[1], 1);
1296-
let updates = get_htlc_update_msgs!(nodes[1], nodes[2].node.get_our_node_id());
1297-
let probe_event = SendEvent::from_commitment_update(nodes[1].node.get_our_node_id(), updates);
1298-
nodes[2].node.handle_update_add_htlc(&nodes[1].node.get_our_node_id(), &probe_event.msgs[0]);
1299-
check_added_monitors!(nodes[2], 0);
1300-
commitment_signed_dance!(nodes[2], nodes[1], probe_event.commitment_msg, true, true);
1288+
send_probe_along_route(&nodes[0], expected_route);
13011289

1302-
// node[1] <- update_fail_htlcs -- node[2]
1303-
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
1304-
nodes[1].node.handle_update_fail_htlc(&nodes[2].node.get_our_node_id(), &updates.update_fail_htlcs[0]);
1305-
check_added_monitors!(nodes[1], 0);
1306-
commitment_signed_dance!(nodes[1], nodes[2], updates.commitment_signed, true);
1307-
1308-
// node[0] <- update_fail_htlcs -- node[1]
1309-
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1310-
nodes[0].node.handle_update_fail_htlc(&nodes[1].node.get_our_node_id(), &updates.update_fail_htlcs[0]);
1311-
check_added_monitors!(nodes[0], 0);
1312-
commitment_signed_dance!(nodes[0], nodes[1], updates.commitment_signed, false);
1290+
expect_probe_successful_events(&nodes[0], vec![res]);
13131291

1314-
let mut events = nodes[0].node.get_and_clear_pending_events();
1315-
assert_eq!(events.len(), 1);
1316-
match events.drain(..).next().unwrap() {
1317-
crate::events::Event::ProbeSuccessful { payment_id: ev_pid, payment_hash: ev_ph, .. } => {
1318-
assert_eq!(payment_id, ev_pid);
1319-
assert_eq!(payment_hash, ev_ph);
1320-
},
1321-
_ => panic!(),
1322-
};
13231292
assert!(!nodes[0].node.has_pending_payments());
13241293
}
13251294

@@ -1424,6 +1393,94 @@ fn onchain_failed_probe_yields_event() {
14241393
assert!(!nodes[0].node.has_pending_payments());
14251394
}
14261395

1396+
#[test]
1397+
fn preflight_probes_yield_event_skip_private_hop() {
1398+
let chanmon_cfgs = create_chanmon_cfgs(5);
1399+
let node_cfgs = create_node_cfgs(5, &chanmon_cfgs);
1400+
1401+
// We alleviate the HTLC max-in-flight limit, as otherwise we'd always be limited through that.
1402+
let mut no_htlc_limit_config = test_default_channel_config();
1403+
no_htlc_limit_config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
1404+
1405+
let user_configs = std::iter::repeat(no_htlc_limit_config).take(5).map(|c| Some(c)).collect::<Vec<Option<UserConfig>>>();
1406+
let node_chanmgrs = create_node_chanmgrs(5, &node_cfgs, &user_configs);
1407+
let nodes = create_network(5, &node_cfgs, &node_chanmgrs);
1408+
1409+
// Setup channel topology:
1410+
// N0 -(1M:0)- N1 -(1M:0)- N2 -(70k:0)- N3 -(50k:0)- N4
1411+
1412+
create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 1_000_000, 0);
1413+
create_announced_chan_between_nodes_with_value(&nodes, 1, 2, 1_000_000, 0);
1414+
create_announced_chan_between_nodes_with_value(&nodes, 2, 3, 70_000, 0);
1415+
create_unannounced_chan_between_nodes_with_value(&nodes, 3, 4, 50_000, 0);
1416+
1417+
let mut invoice_features = Bolt11InvoiceFeatures::empty();
1418+
invoice_features.set_basic_mpp_optional();
1419+
1420+
let payment_params = PaymentParameters::from_node_id(nodes[3].node.get_our_node_id(), TEST_FINAL_CLTV)
1421+
.with_bolt11_features(invoice_features).unwrap();
1422+
1423+
let recv_value = 50_000_000;
1424+
let route_params = RouteParameters::from_payment_params_and_value(payment_params, recv_value);
1425+
let res = nodes[0].node.send_preflight_probes(route_params, None).unwrap();
1426+
1427+
let expected_route: &[&[&Node]] = &[&[&nodes[1], &nodes[2], &nodes[3]]];
1428+
1429+
assert_eq!(res.len(), expected_route.len());
1430+
1431+
send_probe_along_route(&nodes[0], expected_route);
1432+
1433+
expect_probe_successful_events(&nodes[0], res.clone());
1434+
1435+
assert!(!nodes[0].node.has_pending_payments());
1436+
}
1437+
1438+
#[test]
1439+
fn preflight_probes_yield_event() {
1440+
let chanmon_cfgs = create_chanmon_cfgs(4);
1441+
let node_cfgs = create_node_cfgs(4, &chanmon_cfgs);
1442+
1443+
// We alleviate the HTLC max-in-flight limit, as otherwise we'd always be limited through that.
1444+
let mut no_htlc_limit_config = test_default_channel_config();
1445+
no_htlc_limit_config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
1446+
1447+
let user_configs = std::iter::repeat(no_htlc_limit_config).take(4).map(|c| Some(c)).collect::<Vec<Option<UserConfig>>>();
1448+
let node_chanmgrs = create_node_chanmgrs(4, &node_cfgs, &user_configs);
1449+
let nodes = create_network(4, &node_cfgs, &node_chanmgrs);
1450+
1451+
// Setup channel topology:
1452+
// (1M:0)- N1 -(30k:0)
1453+
// / \
1454+
// N0 N4
1455+
// \ /
1456+
// (1M:0)- N2 -(70k:0)
1457+
//
1458+
create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 1_000_000, 0);
1459+
create_announced_chan_between_nodes_with_value(&nodes, 0, 2, 1_000_000, 0);
1460+
create_announced_chan_between_nodes_with_value(&nodes, 1, 3, 30_000, 0);
1461+
create_announced_chan_between_nodes_with_value(&nodes, 2, 3, 70_000, 0);
1462+
1463+
let mut invoice_features = Bolt11InvoiceFeatures::empty();
1464+
invoice_features.set_basic_mpp_optional();
1465+
1466+
let payment_params = PaymentParameters::from_node_id(nodes[3].node.get_our_node_id(), TEST_FINAL_CLTV)
1467+
.with_bolt11_features(invoice_features).unwrap();
1468+
1469+
let recv_value = 50_000_000;
1470+
let route_params = RouteParameters::from_payment_params_and_value(payment_params, recv_value);
1471+
let res = nodes[0].node.send_preflight_probes(route_params, None).unwrap();
1472+
1473+
let expected_route: &[&[&Node]] = &[&[&nodes[1], &nodes[3]], &[&nodes[2], &nodes[3]]];
1474+
1475+
assert_eq!(res.len(), expected_route.len());
1476+
1477+
send_probe_along_route(&nodes[0], expected_route);
1478+
1479+
expect_probe_successful_events(&nodes[0], res.clone());
1480+
1481+
assert!(!nodes[0].node.has_pending_payments());
1482+
}
1483+
14271484
#[test]
14281485
fn preflight_probes_yield_event_and_skip() {
14291486
let chanmon_cfgs = create_chanmon_cfgs(5);
@@ -1444,7 +1501,7 @@ fn preflight_probes_yield_event_and_skip() {
14441501
// \ /
14451502
// (70k:0)- N3 -(1M:0)
14461503
//
1447-
let first_chan_update = create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 100_000, 0).0;
1504+
create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 100_000, 0);
14481505
create_announced_chan_between_nodes_with_value(&nodes, 1, 2, 30_000, 0);
14491506
create_announced_chan_between_nodes_with_value(&nodes, 1, 3, 70_000, 0);
14501507
create_announced_chan_between_nodes_with_value(&nodes, 2, 4, 1_000_000, 0);
@@ -1453,70 +1510,22 @@ fn preflight_probes_yield_event_and_skip() {
14531510
let mut invoice_features = Bolt11InvoiceFeatures::empty();
14541511
invoice_features.set_basic_mpp_optional();
14551512

1456-
let mut payment_params = PaymentParameters::from_node_id(nodes[4].node.get_our_node_id(), TEST_FINAL_CLTV)
1513+
let payment_params = PaymentParameters::from_node_id(nodes[4].node.get_our_node_id(), TEST_FINAL_CLTV)
14571514
.with_bolt11_features(invoice_features).unwrap();
14581515

1459-
let route_params = RouteParameters::from_payment_params_and_value(payment_params, 80_000_000);
1516+
let recv_value = 80_000_000;
1517+
let route_params = RouteParameters::from_payment_params_and_value(payment_params, recv_value);
14601518
let res = nodes[0].node.send_preflight_probes(route_params, None).unwrap();
14611519

1520+
let expected_route : &[&[&Node]] = &[&[&nodes[1], &nodes[2], &nodes[4]]];
1521+
14621522
// We check that only one probe was sent, the other one was skipped due to limited liquidity.
14631523
assert_eq!(res.len(), 1);
1464-
let log_msg = format!("Skipped sending payment probe to avoid putting channel {} under the liquidity limit.",
1465-
first_chan_update.contents.short_channel_id);
1466-
node_cfgs[0].logger.assert_log_contains("lightning::ln::channelmanager", &log_msg, 1);
14671524

1468-
let (payment_hash, payment_id) = res.first().unwrap();
1525+
send_probe_along_route(&nodes[0], expected_route);
14691526

1470-
// node[0] -- update_add_htlcs -> node[1]
1471-
check_added_monitors!(nodes[0], 1);
1472-
let probe_event = SendEvent::from_node(&nodes[0]);
1473-
nodes[1].node.handle_update_add_htlc(&nodes[0].node.get_our_node_id(), &probe_event.msgs[0]);
1474-
check_added_monitors!(nodes[1], 0);
1475-
commitment_signed_dance!(nodes[1], nodes[0], probe_event.commitment_msg, false);
1476-
expect_pending_htlcs_forwardable!(nodes[1]);
1527+
expect_probe_successful_events(&nodes[0], res.clone());
14771528

1478-
// node[1] -- update_add_htlcs -> node[2]
1479-
check_added_monitors!(nodes[1], 1);
1480-
let probe_event = SendEvent::from_node(&nodes[1]);
1481-
nodes[2].node.handle_update_add_htlc(&nodes[1].node.get_our_node_id(), &probe_event.msgs[0]);
1482-
check_added_monitors!(nodes[2], 0);
1483-
commitment_signed_dance!(nodes[2], nodes[1], probe_event.commitment_msg, false);
1484-
expect_pending_htlcs_forwardable!(nodes[2]);
1485-
1486-
// node[2] -- update_add_htlcs -> node[4]
1487-
check_added_monitors!(nodes[2], 1);
1488-
let probe_event = SendEvent::from_node(&nodes[2]);
1489-
nodes[4].node.handle_update_add_htlc(&nodes[2].node.get_our_node_id(), &probe_event.msgs[0]);
1490-
check_added_monitors!(nodes[4], 0);
1491-
commitment_signed_dance!(nodes[4], nodes[2], probe_event.commitment_msg, true, true);
1492-
1493-
// node[2] <- update_fail_htlcs -- node[4]
1494-
let updates = get_htlc_update_msgs!(nodes[4], nodes[2].node.get_our_node_id());
1495-
nodes[2].node.handle_update_fail_htlc(&nodes[4].node.get_our_node_id(), &updates.update_fail_htlcs[0]);
1496-
check_added_monitors!(nodes[2], 0);
1497-
commitment_signed_dance!(nodes[2], nodes[4], updates.commitment_signed, true);
1498-
1499-
// node[1] <- update_fail_htlcs -- node[2]
1500-
let updates = get_htlc_update_msgs!(nodes[2], nodes[1].node.get_our_node_id());
1501-
nodes[1].node.handle_update_fail_htlc(&nodes[2].node.get_our_node_id(), &updates.update_fail_htlcs[0]);
1502-
check_added_monitors!(nodes[1], 0);
1503-
commitment_signed_dance!(nodes[1], nodes[2], updates.commitment_signed, true);
1504-
1505-
// node[0] <- update_fail_htlcs -- node[1]
1506-
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1507-
nodes[0].node.handle_update_fail_htlc(&nodes[1].node.get_our_node_id(), &updates.update_fail_htlcs[0]);
1508-
check_added_monitors!(nodes[0], 0);
1509-
commitment_signed_dance!(nodes[0], nodes[1], updates.commitment_signed, false);
1510-
1511-
let mut events = nodes[0].node.get_and_clear_pending_events();
1512-
assert_eq!(events.len(), 1);
1513-
match events.drain(..).next().unwrap() {
1514-
crate::events::Event::ProbeSuccessful { payment_id: ev_pid, payment_hash: ev_ph, .. } => {
1515-
assert_eq!(*payment_id, ev_pid);
1516-
assert_eq!(*payment_hash, ev_ph);
1517-
},
1518-
_ => panic!(),
1519-
};
15201529
assert!(!nodes[0].node.has_pending_payments());
15211530
}
15221531

lightning/src/ln/reload_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ fn do_test_partial_claim_before_restart(persist_both_monitors: bool) {
747747
assert_eq!(send_events.len(), 2);
748748
let node_1_msgs = remove_first_msg_event_to_node(&nodes[1].node.get_our_node_id(), &mut send_events);
749749
let node_2_msgs = remove_first_msg_event_to_node(&nodes[2].node.get_our_node_id(), &mut send_events);
750-
do_pass_along_path(&nodes[0], &[&nodes[1], &nodes[3]], 15_000_000, payment_hash, Some(payment_secret), node_1_msgs, true, false, None);
751-
do_pass_along_path(&nodes[0], &[&nodes[2], &nodes[3]], 15_000_000, payment_hash, Some(payment_secret), node_2_msgs, true, false, None);
750+
do_pass_along_path(&nodes[0], &[&nodes[1], &nodes[3]], 15_000_000, payment_hash, Some(payment_secret), node_1_msgs, true, false, None, false);
751+
do_pass_along_path(&nodes[0], &[&nodes[2], &nodes[3]], 15_000_000, payment_hash, Some(payment_secret), node_2_msgs, true, false, None, false);
752752

753753
// Now that we have an MPP payment pending, get the latest encoded copies of nodes[3]'s
754754
// monitors and ChannelManager, for use later, if we don't want to persist both monitors.

0 commit comments

Comments
 (0)