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:
Johan T. Halseth
2020-10-02 14:49:02 +02:00
parent d40cf6b592
commit dbeafe8832
7 changed files with 70 additions and 48 deletions

View File

@@ -44,8 +44,8 @@ type LocalChannel struct {
// BOLT-0007.
ChanID lnwire.ShortChannelID
// Capacity is the capacity of the channel expressed in satoshis.
Capacity btcutil.Amount
// Balance is the local balance of the channel expressed in satoshis.
Balance btcutil.Amount
// Node is the peer that this channel has been established with.
Node NodeID