mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-03 02:02:17 +02:00
autopilot: split channel definition into LocalChannel/ChannelEdge
Since non-local channels won't have a balance field, we split the definitions in anticipation of adding one.
This commit is contained in:
@@ -13,7 +13,7 @@ type AgentConstraints interface {
|
||||
// the first return value will represent the amount of additional funds
|
||||
// available towards creating channels. The second return value is the
|
||||
// exact *number* of additional channels available.
|
||||
ChannelBudget(chans []Channel, balance btcutil.Amount) (
|
||||
ChannelBudget(chans []LocalChannel, balance btcutil.Amount) (
|
||||
btcutil.Amount, uint32)
|
||||
|
||||
// MaxPendingOpens returns the maximum number of pending channel
|
||||
@@ -82,7 +82,7 @@ func NewConstraints(minChanSize, maxChanSize btcutil.Amount, chanLimit,
|
||||
// additional channels available.
|
||||
//
|
||||
// Note: part of the AgentConstraints interface.
|
||||
func (h *agentConstraints) ChannelBudget(channels []Channel,
|
||||
func (h *agentConstraints) ChannelBudget(channels []LocalChannel,
|
||||
funds btcutil.Amount) (btcutil.Amount, uint32) {
|
||||
|
||||
// If we're already over our maximum allowed number of channels, then
|
||||
|
Reference in New Issue
Block a user