From 9336b9b3d465a3af3136d3c9d5b86d21bfd88201 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Wed, 18 Nov 2020 15:34:38 +0800 Subject: [PATCH] autopilot: typo fix --- autopilot/agent.go | 4 ++-- autopilot/agent_constraints.go | 10 +++++----- autopilot/betweenness_centrality.go | 2 +- autopilot/interface.go | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/autopilot/agent.go b/autopilot/agent.go index 182abb7f..3ac90382 100644 --- a/autopilot/agent.go +++ b/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() diff --git a/autopilot/agent_constraints.go b/autopilot/agent_constraints.go index 821146d0..dadfc35d 100644 --- a/autopilot/agent_constraints.go +++ b/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 diff --git a/autopilot/betweenness_centrality.go b/autopilot/betweenness_centrality.go index 85041864..aa0b9fce 100644 --- a/autopilot/betweenness_centrality.go +++ b/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. diff --git a/autopilot/interface.go b/autopilot/interface.go index 9359489f..0a7c5d2a 100644 --- a/autopilot/interface.go +++ b/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. //