multi: skip range check in pathfinder and switch for custom htlc payments

This commit is contained in:
ziggie committed 2025-08-06 09:37:08 +02:00
1 parent c4db070e5f
commit e2a9b17254
4 files changed
+112 -48

No files matched your search

+6 -5
View File
@@ -265,12 +265,13 @@ func (u *edgeUnifier) getEdgeLocal(netAmtReceived lnwire.MilliSatoshi,
// Add inbound fee to get to the amount that is sent over the
// local channel.
amt := netAmtReceived + lnwire.MilliSatoshi(inboundFee)
// Check valid amount range for the channel. We skip this test
// for payments with custom HTLC data, as the amount sent on
// the BTC layer may differ from the amount that is actually
// forwarded in custom channels.
if bandwidthHints.firstHopCustomBlob().IsNone() &&
// for payments with custom htlc data we skip the amount range
// check because the amt of the payment does not relate to the
// actual amount carried by the HTLC but instead is encoded in
// the blob data.
if !bandwidthHints.isCustomHTLCPayment() &&
!edge.amtInRange(amt) {
log.Debugf("Amount %v not in range for edge %v",