@@ -1432,7 +1432,20 @@ fn creates_offer_with_blinded_path_using_unannounced_introduction_node() {
14321432 route_bolt12_payment ( bob, & [ alice] , & invoice) ;
14331433 expect_recent_payment ! ( bob, RecentPaymentDetails :: Pending , payment_id) ;
14341434
1435- claim_bolt12_payment ( bob, & [ alice] , payment_context, & invoice) ;
1435+ // When the payer is the introduction node of a blinded path, LDK doesn't
1436+ // subtract the forward fee for the `payer -> next_hop` channel (see
1437+ // `BlindedPaymentPath::advance_path_by_one`). This keeps fee logic simple,
1438+ // at the cost of a small, intentional overpayment.
1439+ //
1440+ // In the old two-hop case (payer as introduction node → payee), this never
1441+ // surfaced because the payer simply wasn’t charged the forward fee.
1442+ //
1443+ // With dummy hops in LDK v0.3, even a real two-node path can appear as a
1444+ // longer blinded route, so the overpayment shows up in tests.
1445+ //
1446+ // Until the fee-handling trade-off is revisited, we pass an expected extra
1447+ // fee here so tests can compensate for it.
1448+ claim_bolt12_payment_with_extra_fees ( bob, & [ alice] , payment_context, & invoice, Some ( 1000 ) ) ;
14361449 expect_recent_payment ! ( bob, RecentPaymentDetails :: Fulfilled , payment_id) ;
14371450}
14381451
@@ -2447,9 +2460,9 @@ fn rejects_keysend_to_non_static_invoice_path() {
24472460 . expect_failure ( HTLCHandlingFailureType :: Receive { payment_hash } ) ;
24482461 do_pass_along_path ( args) ;
24492462 let mut updates = get_htlc_update_msgs ( & nodes[ 1 ] , & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
2450- nodes[ 0 ] . node . handle_update_fail_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates. update_fail_htlcs [ 0 ] ) ;
2463+ nodes[ 0 ] . node . handle_update_fail_malformed_htlc ( nodes[ 1 ] . node . get_our_node_id ( ) , & updates. update_fail_malformed_htlcs [ 0 ] ) ;
24512464 do_commitment_signed_dance ( & nodes[ 0 ] , & nodes[ 1 ] , & updates. commitment_signed , false , false ) ;
2452- expect_payment_failed_conditions ( & nodes[ 0 ] , payment_hash, true , PaymentFailedConditions :: new ( ) ) ;
2465+ expect_payment_failed_conditions ( & nodes[ 0 ] , payment_hash, false , PaymentFailedConditions :: new ( ) ) ;
24532466}
24542467
24552468#[ test]
0 commit comments