routing: skip amtInRange for custom HTLCs

We might be trying to send an invoice amount that's greater than the size of the channel, but once you factor in the custom channel logic, an actual HTLC can be sent over the channel to pay that larger payment.

As a result, we'll skip over this check if a have a custom HTLC.
This commit is contained in:
Olaoluwa Osuntokun
2024-07-11 19:48:47 -07:00
parent 14a6f73258
commit d80bca8c6f

View File

@@ -234,7 +234,7 @@ func (u *edgeUnifier) getEdgeLocal(netAmtReceived lnwire.MilliSatoshi,
amt := netAmtReceived + lnwire.MilliSatoshi(inboundFee)
// Check valid amount range for the channel.
if !edge.amtInRange(amt) {
if htlcBlob.IsNone() && !edge.amtInRange(amt) {
log.Debugf("Amount %v not in range for edge %v",
netAmtReceived, edge.policy.ChannelID)