htlcswitch+routing: add funding blob to PaymentBandwidth

For certain auxiliary bandwidth checks we need to know the funding blob
that was present when the channel was created.
This commit is contained in:
Oliver Gugger
2025-04-22 21:21:11 +02:00
parent 987302923d
commit 56d2381f51
3 changed files with 14 additions and 12 deletions

View File

@@ -145,12 +145,12 @@ func (*mockTrafficShaper) ShouldHandleTraffic(_ lnwire.ShortChannelID,
return true, nil
}
// PaymentBandwidth returns the available bandwidth for a custom channel
// decided by the given channel aux blob and HTLC blob. A return value
// of 0 means there is no bandwidth available. To find out if a channel
// is a custom channel that should be handled by the traffic shaper, the
// HandleTraffic method should be called first.
func (*mockTrafficShaper) PaymentBandwidth(_, _ fn.Option[tlv.Blob],
// PaymentBandwidth returns the available bandwidth for a custom channel decided
// by the given channel funding/commitment aux blob and HTLC blob. A return
// value of 0 means there is no bandwidth available. To find out if a channel is
// a custom channel that should be handled by the traffic shaper, the
// ShouldHandleTraffic method should be called first.
func (*mockTrafficShaper) PaymentBandwidth(_, _, _ fn.Option[tlv.Blob],
linkBandwidth, _ lnwire.MilliSatoshi,
_ lnwallet.AuxHtlcView) (lnwire.MilliSatoshi, error) {