autopilot: fix typo

This commit is contained in:
yyforyongyu 2020-11-23 03:42:03 +08:00
parent 26da2b2c9e
commit e3a6cd8412
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
2 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@ type Node interface {
// LocalChannel is a simple struct which contains relevant details of a // LocalChannel is a simple struct which contains relevant details of a
// particular channel the local node has. The fields in this struct may be used // particular channel the local node has. The fields in this struct may be used
// a signals for various AttachmentHeuristic implementations. // as signals for various AttachmentHeuristic implementations.
type LocalChannel struct { type LocalChannel struct {
// ChanID is the short channel ID for this channel as defined within // ChanID is the short channel ID for this channel as defined within
// BOLT-0007. // BOLT-0007.
@ -118,7 +118,7 @@ type AttachmentDirective struct {
// AttachmentHeuristic is one of the primary interfaces within this package. // AttachmentHeuristic is one of the primary interfaces within this package.
// Implementations of this interface will be used to implement a control system // Implementations of this interface will be used to implement a control system
// which automatically regulates channels of a particular agent, attempting to // which automatically regulates channels of a particular agent, attempting to
// optimize channels opened/closed based on various heuristics. The purpose of // optimize channels opened/closed based on various heuristics. The purpose of
// the interface is to allow an auto-pilot agent to decide if it needs more // the interface is to allow an auto-pilot agent to decide if it needs more
// channels, and if so, which exact channels should be opened. // channels, and if so, which exact channels should be opened.
type AttachmentHeuristic interface { type AttachmentHeuristic interface {
@ -170,7 +170,7 @@ type NodeMetric interface {
// scores. // scores.
type ScoreSettable interface { type ScoreSettable interface {
// SetNodeScores is used to set the internal map from NodeIDs to // SetNodeScores is used to set the internal map from NodeIDs to
// scores. The passed scores must be in the range [0, 1.0]. The fist // scores. The passed scores must be in the range [0, 1.0]. The first
// parameter is the name of the targeted heuristic, to allow // parameter is the name of the targeted heuristic, to allow
// recursively target specific sub-heuristics. The returned boolean // recursively target specific sub-heuristics. The returned boolean
// indicates whether the targeted heuristic was found. // indicates whether the targeted heuristic was found.

View File

@ -42,7 +42,7 @@ type ManagerCfg struct {
// Manager is struct that manages an autopilot agent, making it possible to // Manager is struct that manages an autopilot agent, making it possible to
// enable and disable it at will, and hand it relevant external information. // enable and disable it at will, and hand it relevant external information.
// It implements the autopilot grpc service, which is used to get data about // It implements the autopilot grpc service, which is used to get data about
// the running autopilot, and give it relevant information. // the running autopilot, and gives it relevant information.
type Manager struct { type Manager struct {
started sync.Once started sync.Once
stopped sync.Once stopped sync.Once
@ -222,9 +222,9 @@ func (m *Manager) StartAgent() error {
pilot.OnChannelClose(chanID) pilot.OnChannelClose(chanID)
} }
// If new nodes were added to the graph, or nod // If new nodes were added to the graph, or
// information has changed, we'll poke autopilot // node information has changed, we'll poke
// to see if it can make use of them. // autopilot to see if it can make use of them.
if len(topChange.NodeUpdates) > 0 { if len(topChange.NodeUpdates) > 0 {
pilot.OnNodeUpdates() pilot.OnNodeUpdates()
} }