mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-28 23:02:33 +02:00
Merge pull request #8960 from lightningnetwork/0-19-staging-rebased
[custom channels 5/5]: merge custom channel staging branch into master
This commit is contained in:
@@ -47,7 +47,8 @@ type TlvTrafficShaper interface {
|
||||
// is a custom channel that should be handled by the traffic shaper, the
|
||||
// HandleTraffic method should be called first.
|
||||
PaymentBandwidth(htlcBlob, commitmentBlob fn.Option[tlv.Blob],
|
||||
linkBandwidth lnwire.MilliSatoshi) (lnwire.MilliSatoshi, error)
|
||||
linkBandwidth,
|
||||
htlcAmt lnwire.MilliSatoshi) (lnwire.MilliSatoshi, error)
|
||||
}
|
||||
|
||||
// AuxHtlcModifier is an interface that allows the sender to modify the outgoing
|
||||
@@ -191,6 +192,7 @@ func (b *bandwidthManager) getBandwidth(cid lnwire.ShortChannelID,
|
||||
commitmentBlob := link.CommitmentCustomBlob()
|
||||
auxBandwidth, err := ts.PaymentBandwidth(
|
||||
b.firstHopBlob, commitmentBlob, linkBandwidth,
|
||||
amount,
|
||||
)
|
||||
if err != nil {
|
||||
return bandwidthErr(fmt.Errorf("failed to get "+
|
||||
|
@@ -148,7 +148,7 @@ func (*mockTrafficShaper) ShouldHandleTraffic(_ lnwire.ShortChannelID,
|
||||
// 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],
|
||||
linkBandwidth lnwire.MilliSatoshi) (lnwire.MilliSatoshi, error) {
|
||||
linkBandwidth, _ lnwire.MilliSatoshi) (lnwire.MilliSatoshi, error) {
|
||||
|
||||
return linkBandwidth, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user