mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-30 16:10:01 +01:00
autopilot: rename to Capacity to Balance, define ChannelInfo()
We rename the field Capacity on local channels to Balance, define a new method ChannelInfo on the manager config that let us query the database for our latest channels state. Using this we will use the current local balance instead of the channel capacity when doing allocation calculations.
This commit is contained in:
@@ -100,7 +100,7 @@ func (h *agentConstraints) ChannelBudget(channels []LocalChannel,
|
||||
// present within the set of active channels.
|
||||
var totalChanAllocation btcutil.Amount
|
||||
for _, channel := range channels {
|
||||
totalChanAllocation += channel.Capacity
|
||||
totalChanAllocation += channel.Balance
|
||||
}
|
||||
|
||||
// With this value known, we'll now compute the total amount of fund
|
||||
|
||||
Reference in New Issue
Block a user