Skip to content

Commit bdb21bc

Browse files
committed
routing: don't set custom amount if manager isn't handling
1 parent d10ab03 commit bdb21bc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

routing/bandwidth.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ func (b *bandwidthManager) getBandwidth(cid lnwire.ShortChannelID,
143143
"auxiliary bandwidth: %w", err))
144144
}
145145

146+
// If AuxBandwidth returns None, it means the external
147+
// traffic shaper is not handling the channel. In that
148+
// case, we'll just return the original bandwidth and
149+
// no custom amount.
150+
if auxBandwidth.IsNone() {
151+
return fn.Ok(bandwidthResult{})
152+
}
153+
146154
// We don't know the actual HTLC amount that will be
147155
// sent using the custom channel. But we'll still want
148156
// to make sure we can add another HTLC, using the

0 commit comments

Comments
 (0)