1010
1111use ldk_node:: config:: { Config , EsploraSyncConfig } ;
1212use 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+ } ;
1416use 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 ! ( "\n B 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 ! ( "\n A overpaid send" ) ;
@@ -644,8 +650,10 @@ pub(crate) fn do_channel_full_cycle<E: ElectrumApi>(
644650
645651 // Test "zero-amount" invoice payment
646652 println ! ( "\n B 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
0 commit comments