trivial: Fix spelling errors

- Fixes some spelling in code comments and a couple of function names
This commit is contained in:
Michael Rooke committed 2023-09-21 22:35:33 -04:00
1 parent ec585431a9
commit 78d9996620
30 files changed
+65 -52

No files matched your search

+2 -2
View File
@@ -355,7 +355,7 @@ type RestrictParams struct {
}
// PathFindingConfig defines global parameters that control the trade-off in
// path finding between fees and probabiity.
// path finding between fees and probability.
type PathFindingConfig struct {
// AttemptCost is the fixed virtual cost in path finding of a failed
// payment attempt. It is used to trade off potentially better routes
@@ -1035,7 +1035,7 @@ func getProbabilityBasedDist(weight int64, probability float64,
// Avoid cast if an overflow would occur. The maxFloat constant is
// chosen to stay well below the maximum float64 value that is still
// convertable to int64.
// convertible to int64.
const maxFloat = 9000000000000000000
if dist > maxFloat {
return infinity
+1 -1
View File
@@ -519,7 +519,7 @@ func (g *testGraphInstance) getLink(chanID lnwire.ShortChannelID) (
// createTestGraphFromChannels returns a fully populated ChannelGraph based on a set of
// test channels. Additional required information like keys are derived in
// a deterministical way and added to the channel graph. A list of nodes is
// a deterministic way and added to the channel graph. A list of nodes is
// not required and derived from the channel data. The goal is to keep
// instantiating a test channel graph as light weight as possible.
func createTestGraphFromChannels(t *testing.T, useCache bool,
+1 -1
View File
@@ -31,7 +31,7 @@ type paymentLifecycle struct {
currentHeight int32
}
// payemntState holds a number of key insights learned from a given MPPayment
// paymentState holds a number of key insights learned from a given MPPayment
// that we use to determine what to do on each payment loop iteration.
type paymentState struct {
numShardsInFlight int
+1 -1
View File
@@ -175,7 +175,7 @@ type paymentSession struct {
getRoutingGraph func() (routingGraph, func(), error)
// pathFindingConfig defines global parameters that control the
// trade-off in path finding between fees and probabiity.
// trade-off in path finding between fees and probability.
pathFindingConfig PathFindingConfig
missionControl MissionController
+1 -1
View File
@@ -39,7 +39,7 @@ type SessionSource struct {
MissionControl MissionController
// PathFindingConfig defines global parameters that control the
// trade-off in path finding between fees and probabiity.
// trade-off in path finding between fees and probability.
PathFindingConfig PathFindingConfig
}
+1 -1
View File
@@ -32,7 +32,7 @@ const (
// minCapacityFactor is the minimal value the capacityFactor can take.
// Having a too low value can lead to discarding of paths due to the
// enforced minimal proability or to too high pathfinding weights.
// enforced minimal probability or to too high pathfinding weights.
minCapacityFactor = 0.5
// minCapacityFraction is the minimum allowed value for
+1 -1
View File
@@ -18,7 +18,7 @@ const (
// untriedNode is a node id for which we don't record any results in
// this test. This can be used to assert the probability for untried
// ndoes.
// nodes.
untriedNode = 255
// Define test estimator parameters.
+1 -1
View File
@@ -400,7 +400,7 @@ func NewRouteFromHops(amtToSend lnwire.MilliSatoshi, timeLock uint32,
}
// ToSphinxPath converts a complete route into a sphinx PaymentPath that
// contains the per-hop paylods used to encoding the HTLC routing data for each
// contains the per-hop payloads used to encoding the HTLC routing data for each
// hop in the route. This method also accepts an optional EOB payload for the
// final hop.
func (r *Route) ToSphinxPath() (*sphinx.PaymentPath, error) {
+1 -1
View File
@@ -68,7 +68,7 @@ const (
//
// NOTE: For payment requests, BOLT 11 stipulates that a final CLTV
// delta of 9 should be used when no value is decoded. This however
// leads to inflexiblity in upgrading this default parameter, since it
// leads to inflexibility in upgrading this default parameter, since it
// can create inconsistencies around the assumed value between sender
// and receiver. Specifically, if the receiver assumes a higher value
// than the sender, the receiver will always see the received HTLCs as