let expiry_secs = 60 * 60;
let (payment_hash, payment_secret) = nodes[1].node.create_inbound_payment(Some(amt_msat), expiry_secs, None).unwrap();
- let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_features(nodes[1].node.invoice_features());
let scorer = test_utils::TestScorer::with_penalty(0);
let keys_manager = test_utils::TestKeysInterface::new(&[0u8; 32], Network::Testnet);
create_announced_chan_between_nodes(&nodes, 0, 1);
create_announced_chan_between_nodes_with_value(&nodes, 1, 2, 100000, 90000000);
- let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id());
+ let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id(), 42);
let (route, _, _, _) = get_route_and_payment_hash!(&nodes[0], nodes[2], &payment_params, 9_998_000, 42);
let chan_id = create_announced_chan_between_nodes(&nodes, 0, 1).2;
create_announced_chan_between_nodes(&nodes, 1, 2);
- let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id());
+ let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id(), 42);
// Send a dust HTLC, which will be treated as if it timed out once the channel hits the chain.
let (route, _, _, _) = get_route_and_payment_hash!(&nodes[0], nodes[2], &payment_params, 1_000, 42);
let amt_msat = 100_000;
let intercept_scid = nodes[1].node.get_intercept_scid();
- let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_route_hints(vec![
RouteHint(vec![RouteHintHop {
src_node_id: nodes[1].node.get_our_node_id(),
invoice_features.set_variable_length_onion_required();
invoice_features.set_payment_secret_required();
invoice_features.set_basic_mpp_optional();
- let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[2].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_expiry_time(payment_expiry_secs as u64)
.with_features(invoice_features);
let route_params = RouteParameters {
invoice_features.set_variable_length_onion_required();
invoice_features.set_payment_secret_required();
invoice_features.set_basic_mpp_optional();
- let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_expiry_time(payment_expiry_secs as u64)
.with_features(invoice_features);
let route_params = RouteParameters {
cltv_expiry_delta: 100,
}],
],
- payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())),
+ payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)),
};
let retry_1_route = Route {
paths: vec![
cltv_expiry_delta: 100,
}],
],
- payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())),
+ payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)),
};
let retry_2_route = Route {
paths: vec![
cltv_expiry_delta: 100,
}],
],
- payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())),
+ payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)),
};
nodes[0].router.expect_find_route(Ok(send_route));
nodes[0].router.expect_find_route(Ok(retry_1_route));
invoice_features.set_variable_length_onion_required();
invoice_features.set_payment_secret_required();
invoice_features.set_basic_mpp_optional();
- let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_expiry_time(payment_expiry_secs as u64)
.with_features(invoice_features);
let route_params = RouteParameters {
invoice_features.set_variable_length_onion_required();
invoice_features.set_payment_secret_required();
invoice_features.set_basic_mpp_optional();
- let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_expiry_time(payment_expiry_secs as u64)
.with_features(invoice_features);
let route_params = RouteParameters {
cltv_expiry_delta: 100,
}],
],
- payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())),
+ payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)),
};
nodes[0].router.expect_find_route(Ok(route.clone()));
// On retry, split the payment across both channels.
invoice_features.set_variable_length_onion_required();
invoice_features.set_payment_secret_required();
invoice_features.set_basic_mpp_optional();
- let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_expiry_time(payment_expiry_secs as u64)
.with_features(invoice_features);
let route_params = RouteParameters {
cltv_expiry_delta: 100,
}],
],
- payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())),
+ payment_params: Some(PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)),
};
nodes[0].router.expect_find_route(Ok(route.clone()));
// On retry, split the payment across both channels.
invoice_features.set_variable_length_onion_required();
invoice_features.set_payment_secret_required();
invoice_features.set_basic_mpp_optional();
- let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_expiry_time(payment_expiry_secs as u64)
.with_features(invoice_features);
let route_params = RouteParameters {
cltv_expiry_delta: 100,
}]
],
- payment_params: Some(PaymentParameters::from_node_id(nodes[2].node.get_our_node_id())),
+ payment_params: Some(PaymentParameters::from_node_id(nodes[2].node.get_our_node_id(), TEST_FINAL_CLTV)),
};
nodes[0].router.expect_find_route(Ok(route.clone()));
// On retry, we'll only be asked for one path
invoice_features.set_variable_length_onion_required();
invoice_features.set_payment_secret_required();
invoice_features.set_basic_mpp_optional();
- let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id())
+ let payment_params = PaymentParameters::from_node_id(nodes[1].node.get_our_node_id(), TEST_FINAL_CLTV)
.with_expiry_time(payment_expiry_secs as u64)
.with_features(invoice_features);
let route_params = RouteParameters {