Skip to content

Commit d80bca8

Browse files
committed
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.
1 parent 14a6f73 commit d80bca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routing/unified_edges.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func (u *edgeUnifier) getEdgeLocal(netAmtReceived lnwire.MilliSatoshi,
234234
amt := netAmtReceived + lnwire.MilliSatoshi(inboundFee)
235235

236236
// Check valid amount range for the channel.
237-
if !edge.amtInRange(amt) {
237+
if htlcBlob.IsNone() && !edge.amtInRange(amt) {
238238
log.Debugf("Amount %v not in range for edge %v",
239239
netAmtReceived, edge.policy.ChannelID)
240240

0 commit comments

Comments
 (0)