From 86a07a4ba7870657e9661e4ab200505dcbfd2de0 Mon Sep 17 00:00:00 2001 From: Ian Slane Date: Tue, 13 Aug 2024 07:10:53 -0600 Subject: [PATCH] Add `SendingParameters` to cln tests --- tests/integration_tests_cln.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests_cln.rs b/tests/integration_tests_cln.rs index 7aea13620..93ad052df 100644 --- a/tests/integration_tests_cln.rs +++ b/tests/integration_tests_cln.rs @@ -6,6 +6,7 @@ use ldk_node::bitcoin::secp256k1::PublicKey; use ldk_node::bitcoin::Amount; use ldk_node::lightning::ln::msgs::SocketAddress; use ldk_node::{Builder, Event}; +use ldk_node::payment::SendingParameters; use clightningrpc::lightningrpc::LightningRPC; use clightningrpc::responses::NetworkAddress; @@ -98,7 +99,14 @@ fn test_cln() { cln_client.invoice(Some(10_000_000), &rand_label, &rand_label, None, None, None).unwrap(); let parsed_invoice = Bolt11Invoice::from_str(&cln_invoice.bolt11).unwrap(); - node.bolt11_payment().send(&parsed_invoice).unwrap(); + let payment_params = SendingParameters { + max_total_routing_fee_msat: Some(75_000), + max_total_cltv_expiry_delta: Some(1000), + max_path_count: Some(10), + max_channel_saturation_power_of_half: Some(2), + }; + + node.bolt11_payment().send(&parsed_invoice, Some(payment_params)).unwrap(); common::expect_event!(node, PaymentSuccessful); let cln_listed_invoices = cln_client.listinvoices(Some(&rand_label), None, None, None).unwrap().invoices;