trivial: Fix spelling errors

- Fixes some spelling in code comments and a couple of function names
This commit is contained in:
Michael Rooke
2023-09-20 11:37:32 -04:00
parent ec585431a9
commit 78d9996620
30 changed files with 65 additions and 52 deletions

View File

@@ -141,7 +141,7 @@ type Agent struct {
// time.
chanOpenFailures chan *chanOpenFailureUpdate
// heuristicUpdates is a channel where updates from active heurstics
// heuristicUpdates is a channel where updates from active heuristics
// will be sent.
heuristicUpdates chan *heuristicUpdate

View File

@@ -31,7 +31,7 @@ type AgentConstraints interface {
MaxChanSize() btcutil.Amount
}
// agenConstraints is an implementation of the AgentConstraints interface that
// agentConstraints is an implementation of the AgentConstraints interface that
// indicate the constraints the autopilot agent must adhere to when opening
// channels.
type agentConstraints struct {

View File

@@ -293,7 +293,7 @@ func (m *Manager) queryHeuristics(nodes map[NodeID]struct{}, localState bool) (
HeuristicScores, error) {
// If we want to take the local state into action when querying the
// heuristics, we fetch it. If not we'll just pass an emply slice to
// heuristics, we fetch it. If not we'll just pass an empty slice to
// the heuristic.
var totalChans []LocalChannel
var err error

View File

@@ -7,7 +7,7 @@ package autopilot
// where 0 is maximally costly.
const diameterCutoff = 0.75
// SimpleGraph stores a simplifed adj graph of a channel graph to speed
// SimpleGraph stores a simplified adj graph of a channel graph to speed
// up graph processing by eliminating all unnecessary hashing and map access.
type SimpleGraph struct {
// Nodes is a map from node index to NodeID.
@@ -26,7 +26,7 @@ func NewSimpleGraph(g ChannelGraph) (*SimpleGraph, error) {
nextIndex := 0
// getNodeIndex returns the integer index of the passed node.
// The returned index is then used to create a simplifed adjacency list
// The returned index is then used to create a simplified adjacency list
// where each node is identified by its index instead of its pubkey, and
// also to create a mapping from node index to node pubkey.
getNodeIndex := func(node Node) int {

View File

@@ -66,7 +66,7 @@ func testTopCentrality(t *testing.T, graph testGraph,
}
}
// TestTopCentrality tests that we return the correct normalized centralitiy
// TestTopCentrality tests that we return the correct normalized centrality
// values given a non empty graph, and given our node has an increasing amount
// of channels from 0 to N-1 simulating the whole range from non-connected to
// fully connected.