From e3a6cd84127109276f35df102de1a52d5e7ee13d Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Mon, 23 Nov 2020 03:42:03 +0800 Subject: [PATCH 1/6] autopilot: fix typo --- autopilot/interface.go | 6 +++--- autopilot/manager.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/autopilot/interface.go b/autopilot/interface.go index 0a7c5d2a..7858be43 100644 --- a/autopilot/interface.go +++ b/autopilot/interface.go @@ -38,7 +38,7 @@ type Node interface { // 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 -// a signals for various AttachmentHeuristic implementations. +// as signals for various AttachmentHeuristic implementations. type LocalChannel struct { // ChanID is the short channel ID for this channel as defined within // BOLT-0007. @@ -118,7 +118,7 @@ type AttachmentDirective struct { // AttachmentHeuristic is one of the primary interfaces within this package. // Implementations of this interface will be used to implement a control system // 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 // channels, and if so, which exact channels should be opened. type AttachmentHeuristic interface { @@ -170,7 +170,7 @@ type NodeMetric interface { // scores. type ScoreSettable interface { // 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 // recursively target specific sub-heuristics. The returned boolean // indicates whether the targeted heuristic was found. diff --git a/autopilot/manager.go b/autopilot/manager.go index ecdf879f..04f778d5 100644 --- a/autopilot/manager.go +++ b/autopilot/manager.go @@ -42,7 +42,7 @@ type ManagerCfg struct { // Manager is struct that manages an autopilot agent, making it possible to // 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 -// the running autopilot, and give it relevant information. +// the running autopilot, and gives it relevant information. type Manager struct { started sync.Once stopped sync.Once @@ -222,9 +222,9 @@ func (m *Manager) StartAgent() error { pilot.OnChannelClose(chanID) } - // If new nodes were added to the graph, or nod - // information has changed, we'll poke autopilot - // to see if it can make use of them. + // If new nodes were added to the graph, or + // node information has changed, we'll poke + // autopilot to see if it can make use of them. if len(topChange.NodeUpdates) > 0 { pilot.OnNodeUpdates() } From 5c5fc732e552035ca2831fc0d7115a7028824d1e Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 26 Nov 2020 04:50:19 +0800 Subject: [PATCH 2/6] aezeed: fix typo --- aezeed/cipherseed.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aezeed/cipherseed.go b/aezeed/cipherseed.go index 50ad8f2d..ec6157ca 100644 --- a/aezeed/cipherseed.go +++ b/aezeed/cipherseed.go @@ -114,7 +114,7 @@ var ( // computing our checksum. crcTable = crc32.MakeTable(crc32.Castagnoli) - // defaultPassphras is the default passphrase that will be used for + // defaultPassphrase is the default passphrase that will be used for // encryption in the case that the user chooses not to specify their // own passphrase. defaultPassphrase = []byte("aezeed") @@ -262,7 +262,7 @@ func encodeAD(version uint8, salt [saltSize]byte) [adSize]byte { } // extractAD extracts an associated data from a fully encoded and enciphered -// cipher seed. This is to be used when attempting to decrypt an enciphered +// cipher seed. This is to be used when attempting to decrypt an enciphered // cipher seed. func extractAD(encipheredSeed [EncipheredCipherSeedSize]byte) [adSize]byte { var ad [adSize]byte From 550341c0368a91939d793c7f0fa8a2c2ca55f939 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 26 Nov 2020 05:12:29 +0800 Subject: [PATCH 3/6] lnwire: fix typo --- lnwire/announcement_signatures.go | 2 +- lnwire/channel_reestablish.go | 8 ++++---- lnwire/channel_update.go | 2 +- lnwire/commit_sig.go | 2 +- lnwire/error.go | 4 ++-- lnwire/features.go | 8 ++++---- lnwire/init_message.go | 2 +- lnwire/node_announcement.go | 6 +++--- lnwire/onion_error.go | 2 +- lnwire/open_channel.go | 2 +- lnwire/query_short_chan_ids.go | 8 ++++---- lnwire/reply_short_chan_ids_end.go | 2 +- lnwire/revoke_and_ack.go | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/lnwire/announcement_signatures.go b/lnwire/announcement_signatures.go index 01245213..639704de 100644 --- a/lnwire/announcement_signatures.go +++ b/lnwire/announcement_signatures.go @@ -5,7 +5,7 @@ import ( "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 // the channel to the rest of the network. It contains the necessary // signatures by the sender to construct the channel announcement message. diff --git a/lnwire/channel_reestablish.go b/lnwire/channel_reestablish.go index 42abcf95..6fa8f8ac 100644 --- a/lnwire/channel_reestablish.go +++ b/lnwire/channel_reestablish.go @@ -11,9 +11,9 @@ import ( // 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 // 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 { - // 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. ChanID ChannelID @@ -105,7 +105,7 @@ func (a *ChannelReestablish) Decode(r io.Reader, pver uint32) error { 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 // reader. // @@ -127,7 +127,7 @@ func (a *ChannelReestablish) Decode(r io.Reader, pver uint32) error { copy(a.LastRemoteCommitSecret[:], buf[:]) // 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. return ReadElement(r, &a.LocalUnrevokedCommitPoint) } diff --git a/lnwire/channel_update.go b/lnwire/channel_update.go index c0e9e74d..037f3d55 100644 --- a/lnwire/channel_update.go +++ b/lnwire/channel_update.go @@ -75,7 +75,7 @@ type ChannelUpdate struct { // ShortChannelID is the unique description of the funding transaction. ShortChannelID ShortChannelID - // Timestamp allows ordering in the case of multiple announcements. We + // Timestamp allows ordering in the case of multiple announcements. We // should ignore the message if timestamp is not greater than // the last-received. Timestamp uint32 diff --git a/lnwire/commit_sig.go b/lnwire/commit_sig.go index 2455c016..f15a9738 100644 --- a/lnwire/commit_sig.go +++ b/lnwire/commit_sig.go @@ -5,7 +5,7 @@ import ( ) // CommitSig is sent by either side to stage any pending HTLC's in the -// receiver's pending set into a new commitment state. Implicitly, the new +// receiver's pending set into a new commitment state. Implicitly, the new // commitment transaction constructed which has been signed by CommitSig // includes all HTLC's in the remote node's pending set. A CommitSig message // may be sent after a series of UpdateAddHTLC/UpdateFulfillHTLC messages in diff --git a/lnwire/error.go b/lnwire/error.go index c9fa39a8..3717f8a8 100644 --- a/lnwire/error.go +++ b/lnwire/error.go @@ -15,7 +15,7 @@ const ( ErrMaxPendingChannels FundingError = 1 // 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. 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. func (e FundingError) Error() string { diff --git a/lnwire/features.go b/lnwire/features.go index 250c041e..45ef6eeb 100644 --- a/lnwire/features.go +++ b/lnwire/features.go @@ -66,7 +66,7 @@ const ( // able to decode the new TLV information included in the onion packet. 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 // packet. TLVOnionPayloadOptional FeatureBit = 9 @@ -114,7 +114,7 @@ const ( // outputs. 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 // outputs. AnchorsOptional FeatureBit = 21 @@ -126,7 +126,7 @@ const ( // message to signal the type of message, that leaves us with 65533 bytes // for the init message itself. Next, we reserve 4 bytes to encode the // lengths of both the local and global feature vectors, so 65529 bytes - // for the local and global features. Knocking off one byte for the sake + // for the local and global features. Knocking off one byte for the sake // of the calculation, that leads us to 32764 bytes for each feature // vector, or 131056 different features. maxAllowedSize = 32764 @@ -427,7 +427,7 @@ func (fv *FeatureVector) UnknownRequiredFeatures() []FeatureBit { // 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 -// as much. +// as such. func (fv *FeatureVector) Name(bit FeatureBit) string { name, known := fv.featureNames[bit] if !known { diff --git a/lnwire/init_message.go b/lnwire/init_message.go index 0236a71f..e1ddbb01 100644 --- a/lnwire/init_message.go +++ b/lnwire/init_message.go @@ -12,7 +12,7 @@ type Init struct { // merged with those presented in Features. 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. // // NOTE: Older nodes may place some features in GlobalFeatures, but all diff --git a/lnwire/node_announcement.go b/lnwire/node_announcement.go index f0d897bc..35534352 100644 --- a/lnwire/node_announcement.go +++ b/lnwire/node_announcement.go @@ -34,9 +34,9 @@ func (e ErrInvalidNodeAlias) Error() string { return "node alias has non-utf8 characters" } -// NodeAlias a hex encoded UTF-8 string that may be displayed as an alternative -// to the node's ID. Notice that aliases are not unique and may be freely -// chosen by the node operators. +// NodeAlias is a hex encoded UTF-8 string that may be displayed as an +// alternative to the node's ID. Notice that aliases are not unique and may be +// freely chosen by the node operators. type NodeAlias [32]byte // NewNodeAlias creates a new instance of a NodeAlias. Verification is diff --git a/lnwire/onion_error.go b/lnwire/onion_error.go index c6235552..35555e26 100644 --- a/lnwire/onion_error.go +++ b/lnwire/onion_error.go @@ -39,7 +39,7 @@ const ( // FlagPerm error flag indicates a permanent failure. FlagPerm FailCode = 0x4000 - // FlagNode error flag indicates anode failure. + // FlagNode error flag indicates a node failure. FlagNode FailCode = 0x2000 // FlagUpdate error flag indicates a new channel update is enclosed diff --git a/lnwire/open_channel.go b/lnwire/open_channel.go index f78cc26e..a165ef75 100644 --- a/lnwire/open_channel.go +++ b/lnwire/open_channel.go @@ -106,7 +106,7 @@ type OpenChannel struct { DelayedPaymentPoint *btcec.PublicKey // HtlcPoint is the base point used to derive the set of keys for this - // party that will be used within the HTLC public key scripts. This + // party that will be used within the HTLC public key scripts. This // value is combined with the receiver's revocation base point in order // to derive the keys that are used within HTLC scripts. HtlcPoint *btcec.PublicKey diff --git a/lnwire/query_short_chan_ids.go b/lnwire/query_short_chan_ids.go index cb24178b..3c2b9948 100644 --- a/lnwire/query_short_chan_ids.go +++ b/lnwire/query_short_chan_ids.go @@ -70,7 +70,7 @@ func ErrUnknownShortChanIDEncoding(encoding ShortChanIDEncoding) error { // message. type QueryShortChanIDs struct { // ChainHash denotes the target chain that we're querying for the - // channel channel ID's of. + // channel ID's of. ChainHash chainhash.Hash // 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 // channel ID's from the buffer. case EncodingSortedPlain: - // If after extracting the encoding type, then number of - // remaining bytes instead a whole multiple of the size of an + // If after extracting the encoding type, the number of + // remaining bytes is not a whole multiple of the size of an // encoded short channel ID (8 bytes), then we'll return a // parsing error. if len(queryBody)%8 != 0 { @@ -254,7 +254,7 @@ func decodeShortChanIDs(r io.Reader) (ShortChanIDEncoding, []ShortChannelID, 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. shortChanIDs = append(shortChanIDs, cid) diff --git a/lnwire/reply_short_chan_ids_end.go b/lnwire/reply_short_chan_ids_end.go index ce5f8f74..d77aa0b5 100644 --- a/lnwire/reply_short_chan_ids_end.go +++ b/lnwire/reply_short_chan_ids_end.go @@ -9,7 +9,7 @@ import ( // ReplyShortChanIDsEnd is a message that marks the end of a streaming message // response to an initial QueryShortChanIDs message. This marks that the // 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. type ReplyShortChanIDsEnd struct { // ChainHash denotes the target chain that we're respond to a short diff --git a/lnwire/revoke_and_ack.go b/lnwire/revoke_and_ack.go index d685f0f3..0cfa2bc2 100644 --- a/lnwire/revoke_and_ack.go +++ b/lnwire/revoke_and_ack.go @@ -26,7 +26,7 @@ type RevokeAndAck struct { // NextRevocationKey is the next commitment point which should be used // 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 // transaction. NextRevocationKey *btcec.PublicKey From eb1affd5da505b3a35bb021224612f0a0fca2c9a Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 26 Nov 2020 09:47:01 +0800 Subject: [PATCH 4/6] pool: fix typo --- pool/read_buffer.go | 2 +- pool/write.go | 2 +- pool/write_buffer.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pool/read_buffer.go b/pool/read_buffer.go index 58f6014e..ded81aa6 100644 --- a/pool/read_buffer.go +++ b/pool/read_buffer.go @@ -26,7 +26,7 @@ type ReadBuffer struct { } // NewReadBuffer returns a freshly instantiated ReadBuffer, using the given -// gcInterval and expieryInterval. +// gcInterval and expiryInterval. func NewReadBuffer(gcInterval, expiryInterval time.Duration) *ReadBuffer { return &ReadBuffer{ pool: NewRecycle( diff --git a/pool/write.go b/pool/write.go index 9c650a56..ac335f26 100644 --- a/pool/write.go +++ b/pool/write.go @@ -86,7 +86,7 @@ func (w *Write) newWorkerState() WorkerState { } // Cleanup returns the writeBuf to the underlying buffer pool, and removes the -// goroutine's reference to the readBuf and encapsulating buf. +// goroutine's reference to the writeBuf and encapsulating buf. func (w *writeWorkerState) Cleanup() { w.bufferPool.Return(w.writeBuf) w.writeBuf = nil diff --git a/pool/write_buffer.go b/pool/write_buffer.go index dfcfd9f0..4b133976 100644 --- a/pool/write_buffer.go +++ b/pool/write_buffer.go @@ -13,7 +13,7 @@ const ( DefaultWriteBufferGCInterval = 15 * time.Second // DefaultWriteBufferExpiryInterval is the default, minimum interval - // that must elapse before a Write will release a buffer.Write. The + // that must elapse before a Write will release a buffer.Write. The // maximum time before the buffer can be released is equal to the expiry // interval plus the gc interval. DefaultWriteBufferExpiryInterval = 30 * time.Second From e06768e4ebe5a151271fdcf819901bf89e97b7f6 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Mon, 30 Nov 2020 20:48:39 +0800 Subject: [PATCH 5/6] brontide: fix typo --- brontide/conn.go | 12 ++++++------ brontide/listener.go | 8 ++++---- brontide/noise.go | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/brontide/conn.go b/brontide/conn.go index c64d8a64..bb1efb7f 100644 --- a/brontide/conn.go +++ b/brontide/conn.go @@ -62,8 +62,8 @@ func Dial(local keychain.SingleKeyECDH, netAddr *lnwire.NetAddress, } // We'll ensure that we get ActTwo from the remote peer in a timely - // manner. If they don't respond within 1s, then we'll kill the - // connection. + // manner. If they don't respond within handshakeReadTimeout, then + // we'll kill the connection. err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout)) if err != nil { b.conn.Close() @@ -229,7 +229,7 @@ func (c *Conn) Flush() (int, error) { return c.noise.Flush(c.conn) } -// Close closes the connection. Any blocked Read or Write operations will be +// Close closes the connection. Any blocked Read or Write operations will be // unblocked and return errors. // // Part of the net.Conn interface. @@ -261,7 +261,7 @@ func (c *Conn) SetDeadline(t time.Time) error { return c.conn.SetDeadline(t) } -// SetReadDeadline sets the deadline for future Read calls. A zero value for t +// SetReadDeadline sets the deadline for future Read calls. A zero value for t // means Read will not time out. // // Part of the net.Conn interface. @@ -269,9 +269,9 @@ func (c *Conn) SetReadDeadline(t time.Time) error { return c.conn.SetReadDeadline(t) } -// SetWriteDeadline sets the deadline for future Write calls. Even if write +// SetWriteDeadline sets the deadline for future Write calls. Even if write // times out, it may return n > 0, indicating that some of the data was -// successfully written. A zero value for t means Write will not time out. +// successfully written. A zero value for t means Write will not time out. // // Part of the net.Conn interface. func (c *Conn) SetWriteDeadline(t time.Time) error { diff --git a/brontide/listener.go b/brontide/listener.go index f82b8457..e3f93a66 100644 --- a/brontide/listener.go +++ b/brontide/listener.go @@ -115,8 +115,8 @@ func (l *Listener) doHandshake(conn net.Conn) { } // We'll ensure that we get ActOne from the remote peer in a timely - // manner. If they don't respond within 1s, then we'll kill the - // connection. + // manner. If they don't respond within handshakeReadTimeout, then + // we'll kill the connection. err := conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout)) if err != nil { brontideConn.conn.Close() @@ -160,8 +160,8 @@ func (l *Listener) doHandshake(conn net.Conn) { } // We'll ensure that we get ActTwo from the remote peer in a timely - // manner. If they don't respond within 1 second, then we'll kill the - // connection. + // manner. If they don't respond within handshakeReadTimeout, then + // we'll kill the connection. err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout)) if err != nil { brontideConn.conn.Close() diff --git a/brontide/noise.go b/brontide/noise.go index 18bdd789..1b95b061 100644 --- a/brontide/noise.go +++ b/brontide/noise.go @@ -252,7 +252,7 @@ func (s *symmetricState) EncryptAndHash(plaintext []byte) []byte { } // DecryptAndHash returns the authenticated decryption of the passed -// ciphertext. When encrypting the handshake digest (h) is used as the +// ciphertext. When encrypting the handshake digest (h) is used as the // associated data to the AEAD cipher. func (s *symmetricState) DecryptAndHash(ciphertext []byte) ([]byte, error) { plaintext, err := s.Decrypt(s.handshakeDigest[:], nil, ciphertext) @@ -870,7 +870,7 @@ func (b *Machine) ReadHeader(r io.Reader) (uint32, error) { // ReadBody attempts to ready the next message body from the passed io.Reader. // The provided buffer MUST be the length indicated by the packet length // returned by the preceding call to ReadHeader. In the case of an -// authentication eerror, a non-nil error is returned. +// authentication error, a non-nil error is returned. func (b *Machine) ReadBody(r io.Reader, buf []byte) ([]byte, error) { // Next, using the length read from the packet header, read the // encrypted packet itself into the buffer allocated by the read From f46d16ff89e501110ddcd2b305acf14eac85d083 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 1 Dec 2020 21:31:42 +0800 Subject: [PATCH 6/6] peer: fix typo --- peer/brontide.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/peer/brontide.go b/peer/brontide.go index 578d7133..cd5b36f5 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -216,8 +216,8 @@ type Config struct { // SigPool is used when creating *lnwallet.LightningChannel instances. SigPool *lnwallet.SigPool - // Wallet is used to publish transactions and generate delivery scripts - // during the coop close process. + // Wallet is used to publish transactions and generates delivery + // scripts during the coop close process. Wallet *lnwallet.LightningWallet // ChainNotifier is used to receive confirmations of a coop close @@ -438,7 +438,7 @@ func NewBrontide(cfg Config) *Brontide { } // Start starts all helper goroutines the peer needs for normal operations. In -// the case this peer has already been started, then this function is a loop. +// the case this peer has already been started, then this function is a noop. func (p *Brontide) Start() error { if atomic.AddInt32(&p.started, 1) != 1 { return nil @@ -1170,10 +1170,10 @@ func waitUntilLinkActive(p *Brontide, } // newChanMsgStream is used to create a msgStream between the peer and -// particular channel link in the htlcswitch. We utilize additional +// particular channel link in the htlcswitch. We utilize additional // synchronization with the fundingManager to ensure we don't attempt to // dispatch a message to a channel before it is fully active. A reference to the -// channel this stream forwards to his held in scope to prevent unnecessary +// channel this stream forwards to is held in scope to prevent unnecessary // lookups. func newChanMsgStream(p *Brontide, cid lnwire.ChannelID) *msgStream { @@ -1284,7 +1284,7 @@ out: continue // If they sent us an address type that we don't yet - // know of, then this isn't a dire error, so we'll + // know of, then this isn't a wire error, so we'll // simply continue parsing the remainder of their // messages. case *lnwire.ErrUnknownAddrType: @@ -1302,7 +1302,7 @@ out: continue // If the error we encountered wasn't just a message we - // didn't recognize, then we'll stop all processing s + // didn't recognize, then we'll stop all processing as // this is a fatal error. default: break out @@ -2039,7 +2039,7 @@ func (p *Brontide) channelManager() { defer p.wg.Done() // reenableTimeout will fire once after the configured channel status - // interval has elapsed. This will trigger us to sign new channel + // interval has elapsed. This will trigger us to sign new channel // updates and broadcast them with the "disabled" flag unset. reenableTimeout := time.After(p.cfg.ChanActiveTimeout) @@ -2171,7 +2171,7 @@ out: close(newChanReq.err) // We've just received a local request to close an active - // channel. If will either kick of a cooperative channel + // channel. It will either kick of a cooperative channel // closure negotiation, or be a notification of a breached // contract that should be abandoned. case req := <-p.localCloseChanReqs: @@ -2365,7 +2365,7 @@ func (p *Brontide) fetchActiveChanCloser(chanID lnwire.ChannelID) ( func chooseDeliveryScript(upfront, requested lnwire.DeliveryAddress) (lnwire.DeliveryAddress, error) { - // If no upfront upfront shutdown script was provided, return the user + // If no upfront shutdown script was provided, return the user // requested address (which may be nil). if len(upfront) == 0 { return requested, nil @@ -2531,7 +2531,7 @@ func (p *Brontide) handleLinkFailure(failure linkFailureReport) { p.WipeChannel(&failure.chanPoint) // If the error encountered was severe enough, we'll now force close the - // channel to prevent readding it to the switch in the future. + // channel to prevent reading it to the switch in the future. if failure.linkErr.ForceClose { peerLog.Warnf("Force closing link(%v)", failure.shortChanID)