htlcswitch: add HtlcView as PaymentBandwidth argument
In order to get more precise bandwidth reports, we also need to provide this method with the latest htlc view. Since aux data is committed to in the channel commitment, some uncommited HTLCs may not be accounted for, so we need to manually provide them via the HTLC view.
This commit is contained in:
3 files changed
+7
-3
No files matched your search
@@ -3505,6 +3505,7 @@ func (l *channelLink) AuxBandwidth(amount lnwire.MilliSatoshi,
|
||||
commitmentBlob := l.CommitmentCustomBlob()
|
||||
auxBandwidth, err := ts.PaymentBandwidth(
|
||||
htlcBlob, commitmentBlob, l.Bandwidth(), amount,
|
||||
l.channel.FetchLatestAuxHTLCView(),
|
||||
)
|
||||
if err != nil {
|
||||
return fn.Err[OptionalBandwidth](fmt.Errorf("failed to get "+
|
||||
|
||||
Reference in new issue
Block a user