@@ -473,7 +473,7 @@ fn creates_and_pays_for_refund_using_two_hop_blinded_path() {
473
473
}
474
474
expect_recent_payment ! ( david, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
475
475
476
- alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
476
+ let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
477
477
478
478
connect_peers ( alice, charlie) ;
479
479
@@ -484,6 +484,8 @@ fn creates_and_pays_for_refund_using_two_hop_blinded_path() {
484
484
david. onion_messenger . handle_onion_message ( & charlie_id, & onion_message) ;
485
485
486
486
let invoice = extract_invoice ( david, & onion_message) ;
487
+ assert_eq ! ( invoice, expected_invoice) ;
488
+
487
489
assert_eq ! ( invoice. amount_msats( ) , 10_000_000 ) ;
488
490
assert_ne ! ( invoice. signing_pubkey( ) , alice_id) ;
489
491
assert ! ( !invoice. payment_paths( ) . is_empty( ) ) ;
@@ -589,12 +591,14 @@ fn creates_and_pays_for_refund_using_one_hop_blinded_path() {
589
591
}
590
592
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
591
593
592
- alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
594
+ let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
593
595
594
596
let onion_message = alice. onion_messenger . next_onion_message_for_peer ( bob_id) . unwrap ( ) ;
595
597
bob. onion_messenger . handle_onion_message ( & alice_id, & onion_message) ;
596
598
597
599
let invoice = extract_invoice ( bob, & onion_message) ;
600
+ assert_eq ! ( invoice, expected_invoice) ;
601
+
598
602
assert_eq ! ( invoice. amount_msats( ) , 10_000_000 ) ;
599
603
assert_ne ! ( invoice. signing_pubkey( ) , alice_id) ;
600
604
assert ! ( !invoice. payment_paths( ) . is_empty( ) ) ;
@@ -681,12 +685,14 @@ fn pays_for_refund_without_blinded_paths() {
681
685
assert ! ( refund. paths( ) . is_empty( ) ) ;
682
686
expect_recent_payment ! ( bob, RecentPaymentDetails :: AwaitingInvoice , payment_id) ;
683
687
684
- alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
688
+ let expected_invoice = alice. node . request_refund_payment ( & refund) . unwrap ( ) ;
685
689
686
690
let onion_message = alice. onion_messenger . next_onion_message_for_peer ( bob_id) . unwrap ( ) ;
687
691
bob. onion_messenger . handle_onion_message ( & alice_id, & onion_message) ;
688
692
689
693
let invoice = extract_invoice ( bob, & onion_message) ;
694
+ assert_eq ! ( invoice, expected_invoice) ;
695
+
690
696
route_bolt12_payment ( bob, & [ alice] , & invoice) ;
691
697
expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
692
698
0 commit comments