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:
7 files changed
+70
-48
No files matched your search
+2
-2
@@ -829,8 +829,8 @@ func (a *Agent) executeDirective(directive AttachmentDirective) {
|
||||
// peers if the connection attempt happens to take too long.
|
||||
delete(a.pendingConns, nodeID)
|
||||
a.pendingOpens[nodeID] = LocalChannel{
|
||||
Capacity: directive.ChanAmt,
|
||||
Node: nodeID,
|
||||
Balance: directive.ChanAmt,
|
||||
Node: nodeID,
|
||||
}
|
||||
a.pendingMtx.Unlock()
|
||||
|
||||
|
||||
Reference in new issue
Block a user