htlcswitch: account for channel reserve in Bandwidth
This commit is contained in:
1 parent
7e7516137d
commit
7e84892c21
2 files changed
+22
-9
No files matched your search
+2
-1
@@ -1264,8 +1264,9 @@ func (l *channelLink) Bandwidth() lnwire.MilliSatoshi {
|
||||
// TODO(roasbeef): subtract reserve
|
||||
channelBandwidth := l.channel.AvailableBalance()
|
||||
overflowBandwidth := l.overflowQueue.TotalHtlcAmount()
|
||||
reserve := lnwire.NewMSatFromSatoshis(l.channel.GetReserve())
|
||||
|
||||
return channelBandwidth - overflowBandwidth
|
||||
return channelBandwidth - overflowBandwidth - reserve
|
||||
}
|
||||
|
||||
// policyUpdate is a message sent to a channel link when an outside sub-system
|
||||
|
||||
Reference in new issue
Block a user