Skip to content

Commit 90d836b

Browse files
committed
fmt
1 parent df17240 commit 90d836b

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

tests/common/mod.rs

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
use ldk_node::config::{Config, EsploraSyncConfig};
1212
use ldk_node::io::sqlite_store::SqliteStore;
13-
use ldk_node::payment::{Bolt11InvoiceStringDescription, PaymentDirection, PaymentKind, PaymentStatus};
13+
use ldk_node::payment::{
14+
Bolt11InvoiceStringDescription, PaymentDirection, PaymentKind, PaymentStatus,
15+
};
1416
use ldk_node::{
1517
Builder, CustomTlvRecord, Event, LightningBalance, LogLevel, Node, NodeError,
1618
PendingSweepBalance,
@@ -604,8 +606,10 @@ pub(crate) fn do_channel_full_cycle<E: ElectrumApi>(
604606

605607
// Test under-/overpayment
606608
let invoice_amount_2_msat = 2500_000;
607-
let invoice =
608-
node_b.bolt11_payment().receive(invoice_amount_2_msat, &invoice_description.clone().into(), 9217).unwrap();
609+
let invoice = node_b
610+
.bolt11_payment()
611+
.receive(invoice_amount_2_msat, &invoice_description.clone().into(), 9217)
612+
.unwrap();
609613

610614
let underpaid_amount = invoice_amount_2_msat - 1;
611615
assert_eq!(
@@ -614,8 +618,10 @@ pub(crate) fn do_channel_full_cycle<E: ElectrumApi>(
614618
);
615619

616620
println!("\nB overpaid receive");
617-
let invoice =
618-
node_b.bolt11_payment().receive(invoice_amount_2_msat, &invoice_description.clone().into(), 9217).unwrap();
621+
let invoice = node_b
622+
.bolt11_payment()
623+
.receive(invoice_amount_2_msat, &invoice_description.clone().into(), 9217)
624+
.unwrap();
619625
let overpaid_amount_msat = invoice_amount_2_msat + 100;
620626

621627
println!("\nA overpaid send");
@@ -644,8 +650,10 @@ pub(crate) fn do_channel_full_cycle<E: ElectrumApi>(
644650

645651
// Test "zero-amount" invoice payment
646652
println!("\nB receive_variable_amount_payment");
647-
let variable_amount_invoice =
648-
node_b.bolt11_payment().receive_variable_amount(&invoice_description.clone().into(), 9217).unwrap();
653+
let variable_amount_invoice = node_b
654+
.bolt11_payment()
655+
.receive_variable_amount(&invoice_description.clone().into(), 9217)
656+
.unwrap();
649657
let determined_amount_msat = 2345_678;
650658
assert_eq!(
651659
Err(NodeError::InvalidInvoice),
@@ -684,7 +692,12 @@ pub(crate) fn do_channel_full_cycle<E: ElectrumApi>(
684692
let manual_payment_hash = PaymentHash(Sha256::hash(&manual_preimage.0).to_byte_array());
685693
let manual_invoice = node_b
686694
.bolt11_payment()
687-
.receive_for_hash(invoice_amount_3_msat, &invoice_description.clone().into(), 9217, manual_payment_hash)
695+
.receive_for_hash(
696+
invoice_amount_3_msat,
697+
&invoice_description.clone().into(),
698+
9217,
699+
manual_payment_hash,
700+
)
688701
.unwrap();
689702
let manual_payment_id = node_a.bolt11_payment().send(&manual_invoice, None).unwrap();
690703

tests/integration_tests_rust.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ fn multi_hop_sending() {
192192

193193
let invoice_description =
194194
Bolt11InvoiceDescription::Direct(Description::new(String::from("asdf")).unwrap());
195-
let invoice = nodes[4].bolt11_payment().receive(2_500_000, &invoice_description.clone().into(), 9217).unwrap();
195+
let invoice = nodes[4]
196+
.bolt11_payment()
197+
.receive(2_500_000, &invoice_description.clone().into(), 9217)
198+
.unwrap();
196199
nodes[0].bolt11_payment().send(&invoice, Some(sending_params)).unwrap();
197200

198201
expect_event!(nodes[1], PaymentForwarded);

0 commit comments

Comments
 (0)