lnwire: fix typo
This commit is contained in:
parent
5c5fc732e5
commit
550341c036
@ -5,7 +5,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AnnounceSignatures this is a direct message between two endpoints of a
|
// AnnounceSignatures is a direct message between two endpoints of a
|
||||||
// channel and serves as an opt-in mechanism to allow the announcement of
|
// channel and serves as an opt-in mechanism to allow the announcement of
|
||||||
// the channel to the rest of the network. It contains the necessary
|
// the channel to the rest of the network. It contains the necessary
|
||||||
// signatures by the sender to construct the channel announcement message.
|
// signatures by the sender to construct the channel announcement message.
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
// to report their local state, and their current knowledge of the state of the
|
// to report their local state, and their current knowledge of the state of the
|
||||||
// remote commitment chain. If a deviation is detected and can be recovered
|
// remote commitment chain. If a deviation is detected and can be recovered
|
||||||
// from, then the necessary messages will be retransmitted. If the level of
|
// from, then the necessary messages will be retransmitted. If the level of
|
||||||
// desynchronization if irreconcilable, then the channel will be force closed.
|
// desynchronization is irreconcilable, then the channel will be force closed.
|
||||||
type ChannelReestablish struct {
|
type ChannelReestablish struct {
|
||||||
// ChanID is the channel ID of the channel state we're attempting
|
// ChanID is the channel ID of the channel state we're attempting to
|
||||||
// synchronize with the remote party.
|
// synchronize with the remote party.
|
||||||
ChanID ChannelID
|
ChanID ChannelID
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ func (a *ChannelReestablish) Decode(r io.Reader, pver uint32) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// This message has to currently defined optional fields. As a result,
|
// This message has currently defined optional fields. As a result,
|
||||||
// we'll only proceed if there's still bytes remaining within the
|
// we'll only proceed if there's still bytes remaining within the
|
||||||
// reader.
|
// reader.
|
||||||
//
|
//
|
||||||
@ -127,7 +127,7 @@ func (a *ChannelReestablish) Decode(r io.Reader, pver uint32) error {
|
|||||||
copy(a.LastRemoteCommitSecret[:], buf[:])
|
copy(a.LastRemoteCommitSecret[:], buf[:])
|
||||||
|
|
||||||
// We'll conclude by parsing out the commitment point. We don't check
|
// We'll conclude by parsing out the commitment point. We don't check
|
||||||
// the error in this case, as it hey included the commit secret, then
|
// the error in this case, as it has included the commit secret, then
|
||||||
// they MUST also include the commit point.
|
// they MUST also include the commit point.
|
||||||
return ReadElement(r, &a.LocalUnrevokedCommitPoint)
|
return ReadElement(r, &a.LocalUnrevokedCommitPoint)
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ const (
|
|||||||
ErrMaxPendingChannels FundingError = 1
|
ErrMaxPendingChannels FundingError = 1
|
||||||
|
|
||||||
// ErrSynchronizingChain is returned by a remote peer that receives a
|
// ErrSynchronizingChain is returned by a remote peer that receives a
|
||||||
// channel update or a funding request while their still syncing to the
|
// channel update or a funding request while it's still syncing to the
|
||||||
// latest state of the blockchain.
|
// latest state of the blockchain.
|
||||||
ErrSynchronizingChain FundingError = 2
|
ErrSynchronizingChain FundingError = 2
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ func (e FundingError) String() string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error returns the human redable version of the target FundingError.
|
// Error returns the human readable version of the target FundingError.
|
||||||
//
|
//
|
||||||
// NOTE: Satisfies the Error interface.
|
// NOTE: Satisfies the Error interface.
|
||||||
func (e FundingError) Error() string {
|
func (e FundingError) Error() string {
|
||||||
|
@ -66,7 +66,7 @@ const (
|
|||||||
// able to decode the new TLV information included in the onion packet.
|
// able to decode the new TLV information included in the onion packet.
|
||||||
TLVOnionPayloadRequired FeatureBit = 8
|
TLVOnionPayloadRequired FeatureBit = 8
|
||||||
|
|
||||||
// TLVOnionPayloadRequired is an optional feature bit that indicates a
|
// TLVOnionPayloadOptional is an optional feature bit that indicates a
|
||||||
// node is able to decode the new TLV information included in the onion
|
// node is able to decode the new TLV information included in the onion
|
||||||
// packet.
|
// packet.
|
||||||
TLVOnionPayloadOptional FeatureBit = 9
|
TLVOnionPayloadOptional FeatureBit = 9
|
||||||
@ -114,7 +114,7 @@ const (
|
|||||||
// outputs.
|
// outputs.
|
||||||
AnchorsRequired FeatureBit = 20
|
AnchorsRequired FeatureBit = 20
|
||||||
|
|
||||||
// AnchorsRequired is an optional feature bit that signals that the
|
// AnchorsOptional is an optional feature bit that signals that the
|
||||||
// node supports channels to be made using commitments having anchor
|
// node supports channels to be made using commitments having anchor
|
||||||
// outputs.
|
// outputs.
|
||||||
AnchorsOptional FeatureBit = 21
|
AnchorsOptional FeatureBit = 21
|
||||||
@ -427,7 +427,7 @@ func (fv *FeatureVector) UnknownRequiredFeatures() []FeatureBit {
|
|||||||
|
|
||||||
// Name returns a string identifier for the feature represented by this bit. If
|
// Name returns a string identifier for the feature represented by this bit. If
|
||||||
// the bit does not represent a known feature, this returns a string indicating
|
// the bit does not represent a known feature, this returns a string indicating
|
||||||
// as much.
|
// as such.
|
||||||
func (fv *FeatureVector) Name(bit FeatureBit) string {
|
func (fv *FeatureVector) Name(bit FeatureBit) string {
|
||||||
name, known := fv.featureNames[bit]
|
name, known := fv.featureNames[bit]
|
||||||
if !known {
|
if !known {
|
||||||
|
@ -12,7 +12,7 @@ type Init struct {
|
|||||||
// merged with those presented in Features.
|
// merged with those presented in Features.
|
||||||
GlobalFeatures *RawFeatureVector
|
GlobalFeatures *RawFeatureVector
|
||||||
|
|
||||||
// Features is a feature vector containing a the features supported by
|
// Features is a feature vector containing the features supported by
|
||||||
// the remote node.
|
// the remote node.
|
||||||
//
|
//
|
||||||
// NOTE: Older nodes may place some features in GlobalFeatures, but all
|
// NOTE: Older nodes may place some features in GlobalFeatures, but all
|
||||||
|
@ -34,9 +34,9 @@ func (e ErrInvalidNodeAlias) Error() string {
|
|||||||
return "node alias has non-utf8 characters"
|
return "node alias has non-utf8 characters"
|
||||||
}
|
}
|
||||||
|
|
||||||
// NodeAlias a hex encoded UTF-8 string that may be displayed as an alternative
|
// NodeAlias is a hex encoded UTF-8 string that may be displayed as an
|
||||||
// to the node's ID. Notice that aliases are not unique and may be freely
|
// alternative to the node's ID. Notice that aliases are not unique and may be
|
||||||
// chosen by the node operators.
|
// freely chosen by the node operators.
|
||||||
type NodeAlias [32]byte
|
type NodeAlias [32]byte
|
||||||
|
|
||||||
// NewNodeAlias creates a new instance of a NodeAlias. Verification is
|
// NewNodeAlias creates a new instance of a NodeAlias. Verification is
|
||||||
|
@ -70,7 +70,7 @@ func ErrUnknownShortChanIDEncoding(encoding ShortChanIDEncoding) error {
|
|||||||
// message.
|
// message.
|
||||||
type QueryShortChanIDs struct {
|
type QueryShortChanIDs struct {
|
||||||
// ChainHash denotes the target chain that we're querying for the
|
// ChainHash denotes the target chain that we're querying for the
|
||||||
// channel channel ID's of.
|
// channel ID's of.
|
||||||
ChainHash chainhash.Hash
|
ChainHash chainhash.Hash
|
||||||
|
|
||||||
// EncodingType is a signal to the receiver of the message that
|
// EncodingType is a signal to the receiver of the message that
|
||||||
@ -155,8 +155,8 @@ func decodeShortChanIDs(r io.Reader) (ShortChanIDEncoding, []ShortChannelID, err
|
|||||||
// In this encoding, we'll simply read a sort array of encoded short
|
// In this encoding, we'll simply read a sort array of encoded short
|
||||||
// channel ID's from the buffer.
|
// channel ID's from the buffer.
|
||||||
case EncodingSortedPlain:
|
case EncodingSortedPlain:
|
||||||
// If after extracting the encoding type, then number of
|
// If after extracting the encoding type, the number of
|
||||||
// remaining bytes instead a whole multiple of the size of an
|
// remaining bytes is not a whole multiple of the size of an
|
||||||
// encoded short channel ID (8 bytes), then we'll return a
|
// encoded short channel ID (8 bytes), then we'll return a
|
||||||
// parsing error.
|
// parsing error.
|
||||||
if len(queryBody)%8 != 0 {
|
if len(queryBody)%8 != 0 {
|
||||||
@ -254,7 +254,7 @@ func decodeShortChanIDs(r io.Reader) (ShortChanIDEncoding, []ShortChannelID, err
|
|||||||
"ID: %v", err)
|
"ID: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We successfully read the next ID, so well collect
|
// We successfully read the next ID, so we'll collect
|
||||||
// that in the set of final ID's to return.
|
// that in the set of final ID's to return.
|
||||||
shortChanIDs = append(shortChanIDs, cid)
|
shortChanIDs = append(shortChanIDs, cid)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
// ReplyShortChanIDsEnd is a message that marks the end of a streaming message
|
// ReplyShortChanIDsEnd is a message that marks the end of a streaming message
|
||||||
// response to an initial QueryShortChanIDs message. This marks that the
|
// response to an initial QueryShortChanIDs message. This marks that the
|
||||||
// receiver of the original QueryShortChanIDs for the target chain has either
|
// receiver of the original QueryShortChanIDs for the target chain has either
|
||||||
// sent all adequate responses it knows of, or doesn't now of any short chan
|
// sent all adequate responses it knows of, or doesn't know of any short chan
|
||||||
// ID's for the target chain.
|
// ID's for the target chain.
|
||||||
type ReplyShortChanIDsEnd struct {
|
type ReplyShortChanIDsEnd struct {
|
||||||
// ChainHash denotes the target chain that we're respond to a short
|
// ChainHash denotes the target chain that we're respond to a short
|
||||||
|
@ -26,7 +26,7 @@ type RevokeAndAck struct {
|
|||||||
|
|
||||||
// NextRevocationKey is the next commitment point which should be used
|
// NextRevocationKey is the next commitment point which should be used
|
||||||
// for the next commitment transaction the remote peer creates for us.
|
// for the next commitment transaction the remote peer creates for us.
|
||||||
// This, in conjunction without revocation base point will be used to
|
// This, in conjunction with revocation base point will be used to
|
||||||
// create the proper revocation key used within the commitment
|
// create the proper revocation key used within the commitment
|
||||||
// transaction.
|
// transaction.
|
||||||
NextRevocationKey *btcec.PublicKey
|
NextRevocationKey *btcec.PublicKey
|
||||||
|
Loading…
Reference in New Issue
Block a user