@@ -543,7 +543,7 @@ fn creates_and_pays_for_offer_using_two_hop_blinded_path() {
543
543
}
544
544
545
545
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
546
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
546
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
547
547
. unwrap ( ) ;
548
548
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
549
549
@@ -712,7 +712,7 @@ fn creates_and_pays_for_offer_using_one_hop_blinded_path() {
712
712
}
713
713
714
714
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
715
- bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) . unwrap ( ) ;
715
+ bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) . unwrap ( ) ;
716
716
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
717
717
718
718
let onion_message = bob. onion_messenger . next_onion_message_for_peer ( alice_id) . unwrap ( ) ;
@@ -833,7 +833,7 @@ fn pays_for_offer_without_blinded_paths() {
833
833
assert ! ( offer. paths( ) . is_empty( ) ) ;
834
834
835
835
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
836
- bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) . unwrap ( ) ;
836
+ bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) . unwrap ( ) ;
837
837
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
838
838
839
839
let onion_message = bob. onion_messenger . next_onion_message_for_peer ( alice_id) . unwrap ( ) ;
@@ -960,7 +960,7 @@ fn send_invoice_requests_with_distinct_reply_path() {
960
960
}
961
961
962
962
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
963
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
963
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
964
964
. unwrap ( ) ;
965
965
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
966
966
connect_peers ( david, bob) ;
@@ -1094,7 +1094,7 @@ fn creates_and_pays_for_offer_with_retry() {
1094
1094
assert_eq ! ( path. introduction_node( ) , & IntroductionNode :: NodeId ( alice_id) ) ;
1095
1095
}
1096
1096
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1097
- bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) . unwrap ( ) ;
1097
+ bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) . unwrap ( ) ;
1098
1098
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
1099
1099
1100
1100
let _lost_onion_message = bob. onion_messenger . next_onion_message_for_peer ( alice_id) . unwrap ( ) ;
@@ -1166,7 +1166,7 @@ fn pays_bolt12_invoice_asynchronously() {
1166
1166
. build ( ) . unwrap ( ) ;
1167
1167
1168
1168
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1169
- bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) . unwrap ( ) ;
1169
+ bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) . unwrap ( ) ;
1170
1170
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
1171
1171
1172
1172
let onion_message = bob. onion_messenger . next_onion_message_for_peer ( alice_id) . unwrap ( ) ;
@@ -1263,7 +1263,7 @@ fn creates_offer_with_blinded_path_using_unannounced_introduction_node() {
1263
1263
}
1264
1264
1265
1265
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1266
- bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) . unwrap ( ) ;
1266
+ bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) . unwrap ( ) ;
1267
1267
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
1268
1268
1269
1269
let onion_message = bob. onion_messenger . next_onion_message_for_peer ( alice_id) . unwrap ( ) ;
@@ -1404,7 +1404,7 @@ fn fails_authentication_when_handling_invoice_request() {
1404
1404
1405
1405
// Send the invoice request directly to Alice instead of using a blinded path.
1406
1406
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1407
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
1407
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
1408
1408
. unwrap ( ) ;
1409
1409
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
1410
1410
@@ -1430,7 +1430,7 @@ fn fails_authentication_when_handling_invoice_request() {
1430
1430
1431
1431
// Send the invoice request to Alice using an invalid blinded path.
1432
1432
let payment_id = PaymentId ( [ 2 ; 32 ] ) ;
1433
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
1433
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
1434
1434
. unwrap ( ) ;
1435
1435
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
1436
1436
@@ -1507,7 +1507,7 @@ fn fails_authentication_when_handling_invoice_for_offer() {
1507
1507
1508
1508
// Initiate an invoice request, but abandon tracking it.
1509
1509
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1510
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
1510
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
1511
1511
. unwrap ( ) ;
1512
1512
david. node . abandon_payment ( payment_id) ;
1513
1513
get_event ! ( david, Event :: PaymentFailed ) ;
@@ -1524,7 +1524,7 @@ fn fails_authentication_when_handling_invoice_for_offer() {
1524
1524
} ;
1525
1525
1526
1526
let payment_id = PaymentId ( [ 2 ; 32 ] ) ;
1527
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
1527
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
1528
1528
. unwrap ( ) ;
1529
1529
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
1530
1530
@@ -1708,7 +1708,7 @@ fn fails_creating_or_paying_for_offer_without_connected_peers() {
1708
1708
1709
1709
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1710
1710
1711
- match david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) {
1711
+ match david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) {
1712
1712
Ok ( _) => panic ! ( "Expected error" ) ,
1713
1713
Err ( e) => assert_eq ! ( e, Bolt12SemanticError :: MissingPaths ) ,
1714
1714
}
@@ -1721,7 +1721,7 @@ fn fails_creating_or_paying_for_offer_without_connected_peers() {
1721
1721
1722
1722
assert ! (
1723
1723
david. node. pay_for_offer(
1724
- & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( )
1724
+ & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None
1725
1725
) . is_ok( )
1726
1726
) ;
1727
1727
@@ -1812,7 +1812,7 @@ fn fails_creating_invoice_request_for_unsupported_chain() {
1812
1812
. build ( ) . unwrap ( ) ;
1813
1813
1814
1814
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1815
- match bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) {
1815
+ match bob. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) {
1816
1816
Ok ( _) => panic ! ( "Expected error" ) ,
1817
1817
Err ( e) => assert_eq ! ( e, Bolt12SemanticError :: UnsupportedChain ) ,
1818
1818
}
@@ -1871,7 +1871,7 @@ fn fails_creating_invoice_request_without_blinded_reply_path() {
1871
1871
1872
1872
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1873
1873
1874
- match david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) {
1874
+ match david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) {
1875
1875
Ok ( _) => panic ! ( "Expected error" ) ,
1876
1876
Err ( e) => assert_eq ! ( e, Bolt12SemanticError :: MissingPaths ) ,
1877
1877
}
@@ -1906,12 +1906,12 @@ fn fails_creating_invoice_request_with_duplicate_payment_id() {
1906
1906
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1907
1907
assert ! (
1908
1908
david. node. pay_for_offer(
1909
- & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( )
1909
+ & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None
1910
1910
) . is_ok( )
1911
1911
) ;
1912
1912
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
1913
1913
1914
- match david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) {
1914
+ match david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) {
1915
1915
Ok ( _) => panic ! ( "Expected error" ) ,
1916
1916
Err ( e) => assert_eq ! ( e, Bolt12SemanticError :: DuplicatePaymentId ) ,
1917
1917
}
@@ -1990,7 +1990,7 @@ fn fails_sending_invoice_without_blinded_payment_paths_for_offer() {
1990
1990
. build ( ) . unwrap ( ) ;
1991
1991
1992
1992
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
1993
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
1993
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
1994
1994
. unwrap ( ) ;
1995
1995
1996
1996
connect_peers ( david, bob) ;
@@ -2199,7 +2199,7 @@ fn fails_paying_invoice_with_unknown_required_features() {
2199
2199
. build ( ) . unwrap ( ) ;
2200
2200
2201
2201
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
2202
- david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) )
2202
+ david. node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None )
2203
2203
. unwrap ( ) ;
2204
2204
2205
2205
connect_peers ( david, bob) ;
@@ -2276,7 +2276,7 @@ fn rejects_keysend_to_non_static_invoice_path() {
2276
2276
let offer = nodes[ 1 ] . node . create_offer_builder ( None ) . unwrap ( ) . build ( ) . unwrap ( ) ;
2277
2277
let amt_msat = 5000 ;
2278
2278
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
2279
- nodes[ 0 ] . node . pay_for_offer ( & offer, Some ( amt_msat) , payment_id, OptionalOfferPaymentInfo :: default ( ) ) . unwrap ( ) ;
2279
+ nodes[ 0 ] . node . pay_for_offer ( & offer, Some ( amt_msat) , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) . unwrap ( ) ;
2280
2280
let invreq_om = nodes[ 0 ] . onion_messenger . next_onion_message_for_peer ( nodes[ 1 ] . node . get_our_node_id ( ) ) . unwrap ( ) ;
2281
2281
nodes[ 1 ] . onion_messenger . handle_onion_message ( nodes[ 0 ] . node . get_our_node_id ( ) , & invreq_om) ;
2282
2282
let invoice_om = nodes[ 1 ] . onion_messenger . next_onion_message_for_peer ( nodes[ 0 ] . node . get_our_node_id ( ) ) . unwrap ( ) ;
@@ -2361,7 +2361,7 @@ fn no_double_pay_with_stale_channelmanager() {
2361
2361
assert ! ( offer. paths( ) . is_empty( ) ) ;
2362
2362
2363
2363
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
2364
- nodes[ 0 ] . node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) ) . unwrap ( ) ;
2364
+ nodes[ 0 ] . node . pay_for_offer ( & offer, None , payment_id, OptionalOfferPaymentInfo :: default ( ) , None ) . unwrap ( ) ;
2365
2365
expect_recent_payment ! ( nodes[ 0 ] , RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
2366
2366
2367
2367
let invreq_om = nodes[ 0 ] . onion_messenger . next_onion_message_for_peer ( bob_id) . unwrap ( ) ;
0 commit comments