Skip to content

Commit

Permalink
routing: don't set custom amount if manager isn't handling
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Feb 11, 2025
1 parent d10ab03 commit bdb21bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions routing/bandwidth.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ func (b *bandwidthManager) getBandwidth(cid lnwire.ShortChannelID,
"auxiliary bandwidth: %w", err))
}

// If AuxBandwidth returns None, it means the external
// traffic shaper is not handling the channel. In that
// case, we'll just return the original bandwidth and
// no custom amount.
if auxBandwidth.IsNone() {
return fn.Ok(bandwidthResult{})
}

// We don't know the actual HTLC amount that will be
// sent using the custom channel. But we'll still want
// to make sure we can add another HTLC, using the
Expand Down

0 comments on commit bdb21bc

Please sign in to comment.