@@ -654,8 +654,10 @@ fn creates_and_pays_for_refund_using_two_hop_blinded_path() {
654
654
}
655
655
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
656
656
657
- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
658
657
let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
658
+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
659
+ payment_hash : invoice. payment_hash ( ) ,
660
+ } ) ;
659
661
660
662
connect_peers ( alice, charlie) ;
661
663
@@ -783,8 +785,10 @@ fn creates_and_pays_for_refund_using_one_hop_blinded_path() {
783
785
}
784
786
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
785
787
786
- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
787
788
let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
789
+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
790
+ payment_hash : invoice. payment_hash ( ) ,
791
+ } ) ;
788
792
789
793
let onion_message = alice. onion_messenger . next_onion_message_for_peer ( bob_id) . unwrap ( ) ;
790
794
bob. onion_messenger . handle_onion_message ( alice_id, & onion_message) ;
@@ -888,8 +892,10 @@ fn pays_for_refund_without_blinded_paths() {
888
892
assert ! ( refund. paths( ) . is_empty( ) ) ;
889
893
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
890
894
891
- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
892
895
let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
896
+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
897
+ payment_hash : invoice. payment_hash ( ) ,
898
+ } ) ;
893
899
894
900
let onion_message = alice. onion_messenger . next_onion_message_for_peer ( bob_id) . unwrap ( ) ;
895
901
bob. onion_messenger . handle_onion_message ( alice_id, & onion_message) ;
@@ -2117,8 +2123,10 @@ fn fails_paying_invoice_more_than_once() {
2117
2123
david. onion_messenger . handle_onion_message ( charlie_id, & onion_message) ;
2118
2124
2119
2125
// David initiates paying the first invoice
2120
- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
2121
2126
let ( invoice1, _) = extract_invoice ( david, & onion_message) ;
2127
+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
2128
+ payment_hash : invoice. payment_hash ( ) ,
2129
+ } ) ;
2122
2130
2123
2131
route_bolt12_payment ( david, & [ charlie, bob, alice] , & invoice1) ;
2124
2132
expect_recent_payment ! ( david, RecentPaymentDetails :: Pending , payment_id) ;
0 commit comments