Skip to content

Commit

Permalink
Add SendingParameters to cln tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slanesuke committed Aug 13, 2024
1 parent 7bfed68 commit 86a07a4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/integration_tests_cln.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 86a07a4

Please sign in to comment.