Skip to content

[bug]: SendPaymentV2 does not respect fee limit setting in relation to inbound discounts #8940

@alexbosworth

Description

@alexbosworth

Background

When paying to a payment request the caller can specify a fee limit for the maximum allowable fees to pay, with the assumption that if there is a route that has a fee within that constraint it will be used for the payment.

With the introduction of inbound discounts for routing fees, the fee limit does not respect these discounts and therefore will return no route found even when there is in fact a route that would fulfill the fee limit constraint after inbound discounts are applied.

This is problematic for probe-first payment flows that use the routing fee found in the probe as an input to the fee limit argument of SendPaymentV2

Describe your issue here.

Your environment

  • lnd 0.18.2

Steps to reproduce

  • Create A B C nodes, default routing fees to 1 sat
  • Have B set an inbound discount on AB to allow traffic to be zero-fee when coming from A
  • Probe or attempt paying A->C without a fee limit to confirm that the route from A to C would be zero fee
  • Create an invoice on C and attempt to pay from A to C, with a fee limit of zero

Expected behavior

  • The fee limit should recognize the inbound discount and allow payment

Actual behavior

  • Payment fails with a no route error

Metadata

Metadata

Assignees

Labels

bugUnintended code behaviourinbound feeChanges related to inbound routing feepath finding

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions