trivial: Fix spelling errors
- Fixes some spelling in code comments and a couple of function names
This commit is contained in:
30 files changed
+65
-52
No files matched your search
+14
-8
@@ -589,14 +589,14 @@ func (f *FailInvalidOnionKey) Error() string {
|
||||
return fmt.Sprintf("InvalidOnionKey(onion_sha=%x)", f.OnionSHA256[:])
|
||||
}
|
||||
|
||||
// parseChannelUpdateCompatabilityMode will attempt to parse a channel updated
|
||||
// parseChannelUpdateCompatibilityMode will attempt to parse a channel updated
|
||||
// encoded into an onion error payload in two ways. First, we'll try the
|
||||
// compatibility oriented version wherein we'll _skip_ the length prefixing on
|
||||
// the channel update message. Older versions of c-lighting do this so we'll
|
||||
// attempt to parse these messages in order to retain compatibility. If we're
|
||||
// unable to pull out a fully valid version, then we'll fall back to the
|
||||
// regular parsing mechanism which includes the length prefix an NO type byte.
|
||||
func parseChannelUpdateCompatabilityMode(reader io.Reader, length uint16,
|
||||
func parseChannelUpdateCompatibilityMode(reader io.Reader, length uint16,
|
||||
chanUpdate *ChannelUpdate, pver uint32) error {
|
||||
|
||||
// Instantiate a LimitReader because there may be additional data
|
||||
@@ -683,7 +683,8 @@ func (f *FailTemporaryChannelFailure) Decode(r io.Reader, pver uint32) error {
|
||||
|
||||
if length != 0 {
|
||||
f.Update = &ChannelUpdate{}
|
||||
return parseChannelUpdateCompatabilityMode(
|
||||
|
||||
return parseChannelUpdateCompatibilityMode(
|
||||
r, length, f.Update, pver,
|
||||
)
|
||||
}
|
||||
@@ -767,7 +768,8 @@ func (f *FailAmountBelowMinimum) Decode(r io.Reader, pver uint32) error {
|
||||
}
|
||||
|
||||
f.Update = ChannelUpdate{}
|
||||
return parseChannelUpdateCompatabilityMode(
|
||||
|
||||
return parseChannelUpdateCompatibilityMode(
|
||||
r, length, &f.Update, pver,
|
||||
)
|
||||
}
|
||||
@@ -835,7 +837,8 @@ func (f *FailFeeInsufficient) Decode(r io.Reader, pver uint32) error {
|
||||
}
|
||||
|
||||
f.Update = ChannelUpdate{}
|
||||
return parseChannelUpdateCompatabilityMode(
|
||||
|
||||
return parseChannelUpdateCompatibilityMode(
|
||||
r, length, &f.Update, pver,
|
||||
)
|
||||
}
|
||||
@@ -903,7 +906,8 @@ func (f *FailIncorrectCltvExpiry) Decode(r io.Reader, pver uint32) error {
|
||||
}
|
||||
|
||||
f.Update = ChannelUpdate{}
|
||||
return parseChannelUpdateCompatabilityMode(
|
||||
|
||||
return parseChannelUpdateCompatibilityMode(
|
||||
r, length, &f.Update, pver,
|
||||
)
|
||||
}
|
||||
@@ -960,7 +964,8 @@ func (f *FailExpiryTooSoon) Decode(r io.Reader, pver uint32) error {
|
||||
}
|
||||
|
||||
f.Update = ChannelUpdate{}
|
||||
return parseChannelUpdateCompatabilityMode(
|
||||
|
||||
return parseChannelUpdateCompatibilityMode(
|
||||
r, length, &f.Update, pver,
|
||||
)
|
||||
}
|
||||
@@ -1024,7 +1029,8 @@ func (f *FailChannelDisabled) Decode(r io.Reader, pver uint32) error {
|
||||
}
|
||||
|
||||
f.Update = ChannelUpdate{}
|
||||
return parseChannelUpdateCompatabilityMode(
|
||||
|
||||
return parseChannelUpdateCompatibilityMode(
|
||||
r, length, &f.Update, pver,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user