@@ -654,8 +654,10 @@ fn creates_and_pays_for_refund_using_two_hop_blinded_path() {
654654 }
655655 expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
656656
657- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
658657 let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
658+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
659+ payment_hash : invoice. payment_hash ( ) ,
660+ } ) ;
659661
660662 connect_peers ( alice, charlie) ;
661663
@@ -783,8 +785,10 @@ fn creates_and_pays_for_refund_using_one_hop_blinded_path() {
783785 }
784786 expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
785787
786- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
787788 let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
789+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
790+ payment_hash : invoice. payment_hash ( ) ,
791+ } ) ;
788792
789793 let onion_message = alice. onion_messenger . next_onion_message_for_peer ( bob_id) . unwrap ( ) ;
790794 bob. onion_messenger . handle_onion_message ( alice_id, & onion_message) ;
@@ -888,8 +892,10 @@ fn pays_for_refund_without_blinded_paths() {
888892 assert ! ( refund. paths( ) . is_empty( ) ) ;
889893 expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
890894
891- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
892895 let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
896+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
897+ payment_hash : invoice. payment_hash ( ) ,
898+ } ) ;
893899
894900 let onion_message = alice. onion_messenger . next_onion_message_for_peer ( bob_id) . unwrap ( ) ;
895901 bob. onion_messenger . handle_onion_message ( alice_id, & onion_message) ;
@@ -2117,8 +2123,10 @@ fn fails_paying_invoice_more_than_once() {
21172123 david. onion_messenger . handle_onion_message ( charlie_id, & onion_message) ;
21182124
21192125 // David initiates paying the first invoice
2120- let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ;
21212126 let ( invoice1, _) = extract_invoice ( david, & onion_message) ;
2127+ let payment_context = PaymentContext :: Bolt12Refund ( Bolt12RefundContext {
2128+ payment_hash : invoice. payment_hash ( ) ,
2129+ } ) ;
21222130
21232131 route_bolt12_payment ( david, & [ charlie, bob, alice] , & invoice1) ;
21242132 expect_recent_payment ! ( david, RecentPaymentDetails :: Pending , payment_id) ;
0 commit comments