@@ -168,7 +168,7 @@ fn route_bolt12_payment<'a, 'b, 'c>(
168
168
}
169
169
170
170
fn claim_bolt12_payment < ' a , ' b , ' c > (
171
- node : & Node < ' a , ' b , ' c > , path : & [ & Node < ' a , ' b , ' c > ] , expected_payment_context : PaymentContext
171
+ node : & Node < ' a , ' b , ' c > , path : & [ & Node < ' a , ' b , ' c > ] , expected_payment_context : PaymentContext , invoice : & Bolt12Invoice
172
172
) {
173
173
let recipient = & path[ path. len ( ) - 1 ] ;
174
174
let payment_purpose = match get_event ! ( recipient, Event :: PaymentClaimable ) {
@@ -601,7 +601,7 @@ fn creates_and_pays_for_offer_using_two_hop_blinded_path() {
601
601
route_bolt12_payment ( david, & [ charlie, bob, alice] , & invoice) ;
602
602
expect_recent_payment ! ( david, RecentPaymentDetails :: Pending , payment_id) ;
603
603
604
- claim_bolt12_payment ( david, & [ charlie, bob, alice] , payment_context) ;
604
+ claim_bolt12_payment ( david, & [ charlie, bob, alice] , payment_context, & invoice ) ;
605
605
expect_recent_payment ! ( david, RecentPaymentDetails :: Fulfilled , payment_id) ;
606
606
}
607
607
@@ -684,7 +684,7 @@ fn creates_and_pays_for_refund_using_two_hop_blinded_path() {
684
684
route_bolt12_payment ( david, & [ charlie, bob, alice] , & invoice) ;
685
685
expect_recent_payment ! ( david, RecentPaymentDetails :: Pending , payment_id) ;
686
686
687
- claim_bolt12_payment ( david, & [ charlie, bob, alice] , payment_context) ;
687
+ claim_bolt12_payment ( david, & [ charlie, bob, alice] , payment_context, & invoice ) ;
688
688
expect_recent_payment ! ( david, RecentPaymentDetails :: Fulfilled , payment_id) ;
689
689
}
690
690
@@ -751,7 +751,7 @@ fn creates_and_pays_for_offer_using_one_hop_blinded_path() {
751
751
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
752
752
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
753
753
754
- claim_bolt12_payment ( bob, & [ alice] , payment_context) ;
754
+ claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice ) ;
755
755
expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
756
756
}
757
757
@@ -807,7 +807,7 @@ fn creates_and_pays_for_refund_using_one_hop_blinded_path() {
807
807
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
808
808
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
809
809
810
- claim_bolt12_payment ( bob, & [ alice] , payment_context) ;
810
+ claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice ) ;
811
811
expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
812
812
}
813
813
@@ -861,7 +861,7 @@ fn pays_for_offer_without_blinded_paths() {
861
861
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
862
862
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
863
863
864
- claim_bolt12_payment ( bob, & [ alice] , payment_context) ;
864
+ claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice ) ;
865
865
expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
866
866
}
867
867
@@ -904,7 +904,7 @@ fn pays_for_refund_without_blinded_paths() {
904
904
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
905
905
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
906
906
907
- claim_bolt12_payment ( bob, & [ alice] , payment_context) ;
907
+ claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice ) ;
908
908
expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
909
909
}
910
910
@@ -1142,7 +1142,7 @@ fn creates_and_pays_for_offer_with_retry() {
1142
1142
}
1143
1143
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
1144
1144
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
1145
- claim_bolt12_payment ( bob, & [ alice] , payment_context) ;
1145
+ claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice ) ;
1146
1146
expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
1147
1147
}
1148
1148
@@ -1213,7 +1213,7 @@ fn pays_bolt12_invoice_asynchronously() {
1213
1213
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
1214
1214
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
1215
1215
1216
- claim_bolt12_payment ( bob, & [ alice] , payment_context) ;
1216
+ claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice ) ;
1217
1217
expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
1218
1218
1219
1219
assert_eq ! (
@@ -1293,7 +1293,7 @@ fn creates_offer_with_blinded_path_using_unannounced_introduction_node() {
1293
1293
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
1294
1294
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
1295
1295
1296
- claim_bolt12_payment ( bob, & [ alice] , payment_context) ;
1296
+ claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice ) ;
1297
1297
expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
1298
1298
}
1299
1299
@@ -2149,7 +2149,7 @@ fn fails_paying_invoice_more_than_once() {
2149
2149
assert ! ( david. node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
2150
2150
2151
2151
// Complete paying the first invoice
2152
- claim_bolt12_payment ( david, & [ charlie, bob, alice] , payment_context) ;
2152
+ claim_bolt12_payment ( david, & [ charlie, bob, alice] , payment_context, & invoice1 ) ;
2153
2153
expect_recent_payment ! ( david, RecentPaymentDetails :: Fulfilled , payment_id) ;
2154
2154
}
2155
2155
0 commit comments