Browse Source

autopilot: typo fix

master
yyforyongyu 4 years ago
parent
commit
9336b9b3d4
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
  1. 4
      autopilot/agent.go
  2. 10
      autopilot/agent_constraints.go
  3. 2
      autopilot/betweenness_centrality.go
  4. 2
      autopilot/interface.go

4
autopilot/agent.go

@ -398,7 +398,7 @@ func mergeChanState(pendingChans map[NodeID]LocalChannel,
// controller implements the closed-loop control system of the Agent. The
// controller will make a decision w.r.t channel placement within the graph
// based on: its current internal state of the set of active channels open,
// and external state changes as a result of decisions it makes w.r.t channel
// and external state changes as a result of decisions it makes w.r.t channel
// allocation, or attributes affecting its control loop being updated by the
// backing Lightning Node.
func (a *Agent) controller() {
@ -690,7 +690,7 @@ func (a *Agent) openChans(availableFunds btcutil.Amount, numChans uint32,
// available to open channels. If there are any, we will attempt
// to dispatch the retrieved directives since we can't be
// certain which ones may actually succeed. If too many
// connections succeed, we will they will be ignored and made
// connections succeed, they will be ignored and made
// available to future heuristic selections.
a.pendingMtx.Lock()
defer a.pendingMtx.Unlock()

10
autopilot/agent_constraints.go

@ -8,7 +8,7 @@ import (
// limits it will need to stay inside when opening channels.
type AgentConstraints interface {
// ChannelBudget should, given the passed parameters, return whether
// more channels can be be opened while still staying within the set
// more channels can be opened while still staying within the set
// constraints. If the constraints allow us to open more channels, then
// the first return value will represent the amount of additional funds
// available towards creating channels. The second return value is the
@ -39,15 +39,15 @@ type agentConstraints struct {
// create.
minChanSize btcutil.Amount
// maxChanSize the largest channel that the autopilot agent should
// maxChanSize is the largest channel that the autopilot agent should
// create.
maxChanSize btcutil.Amount
// chanLimit the maximum number of channels that should be created.
// chanLimit is the maximum number of channels that should be created.
chanLimit uint16
// allocation the percentage of total funds that should be committed to
// automatic channel establishment.
// allocation is the percentage of total funds that should be committed
// to automatic channel establishment.
allocation float64
// maxPendingOpens is the maximum number of pending channel

2
autopilot/betweenness_centrality.go

@ -84,7 +84,7 @@ func NewBetweennessCentralityMetric(workers int) (*BetweennessCentrality, error)
// Name returns the name of the metric.
func (bc *BetweennessCentrality) Name() string {
return "betweeness_centrality"
return "betweenness_centrality"
}
// betweennessCentrality is the core of Brandes' algorithm.

2
autopilot/interface.go

@ -14,7 +14,7 @@ import (
// are opened.
const DefaultConfTarget = 3
// Node node is an interface which represents n abstract vertex within the
// Node is an interface which represents n abstract vertex within the
// channel graph. All nodes should have at least a single edge to/from them
// within the graph.
//

Loading…
Cancel
Save