@@ -175,14 +175,14 @@ const (
175175 Add updateType = iota
176176
177177 // Fail is an update type which removes a prior HTLC entry from the
178- // log. Adding a Fail entry to ones log will modify the _remote_
179- // parties update log once a new commitment view has been evaluated
178+ // log. Adding a Fail entry to one's log will modify the _remote_
179+ // party's update log once a new commitment view has been evaluated
180180 // which contains the Fail entry.
181181 Fail
182182
183183 // MalformedFail is an update type which removes a prior HTLC entry
184- // from the log. Adding a MalformedFail entry to ones log will modify
185- // the _remote_ parties update log once a new commitment view has been
184+ // from the log. Adding a MalformedFail entry to one's log will modify
185+ // the _remote_ party's update log once a new commitment view has been
186186 // evaluated which contains the MalformedFail entry. The difference
187187 // from Fail type lie in the different data we have to store.
188188 MalformedFail
@@ -376,7 +376,7 @@ type PaymentDescriptor struct {
376376// PayDescsFromRemoteLogUpdates converts a slice of LogUpdates received from the
377377// remote peer into PaymentDescriptors to inform a link's forwarding decisions.
378378//
379- // NOTE: The provided `logUpdates` MUST corresponding exactly to either the Adds
379+ // NOTE: The provided `logUpdates` MUST correspond exactly to either the Adds
380380// or SettleFails in this channel's forwarding package at `height`.
381381func PayDescsFromRemoteLogUpdates (chanID lnwire.ShortChannelID , height uint64 ,
382382 logUpdates []channeldb.LogUpdate ) ([]* PaymentDescriptor , error ) {
@@ -489,9 +489,9 @@ type commitment struct {
489489 ourMessageIndex uint64
490490 theirMessageIndex uint64
491491
492- // [our|their]HtlcIndex are the current running counters for the HTLC's
492+ // [our|their]HtlcIndex are the current running counters for the HTLCs
493493 // offered by either party. This value is incremented each time a party
494- // offers a new HTLC. The log update methods that consume HTLC's will
494+ // offers a new HTLC. The log update methods that consume HTLCs will
495495 // reference these counters, rather than the running cumulative message
496496 // counters.
497497 ourHtlcIndex uint64
@@ -555,7 +555,7 @@ type commitment struct {
555555// locateOutputIndex is a small helper function to locate the output index of a
556556// particular HTLC within the current commitment transaction. The duplicate map
557557// massed in is to be retained for each output within the commitment
558- // transition. This ensures that we don't assign multiple HTLC's to the same
558+ // transition. This ensures that we don't assign multiple HTLCs to the same
559559// index within the commitment transaction.
560560func locateOutputIndex (p * PaymentDescriptor , tx * wire.MsgTx , ourCommit bool ,
561561 dups map [PaymentHash ][]int32 , cltvs []uint32 ) (int32 , error ) {
@@ -570,7 +570,7 @@ func locateOutputIndex(p *PaymentDescriptor, tx *wire.MsgTx, ourCommit bool,
570570 return false
571571 }
572572
573- // If this their commitment transaction, we'll be trying to locate
573+ // If this is their commitment transaction, we'll be trying to locate
574574 // their pkScripts, otherwise we'll be looking for ours. This is
575575 // required as the commitment states are asymmetric in order to ascribe
576576 // blame in the case of a contract breach.
@@ -603,7 +603,7 @@ func locateOutputIndex(p *PaymentDescriptor, tx *wire.MsgTx, ourCommit bool,
603603 "cltv=%v" , pkScript , p .Amount , p .Timeout )
604604}
605605
606- // populateHtlcIndexes modifies the set of HTLC's locked-into the target view
606+ // populateHtlcIndexes modifies the set of HTLCs locked-into the target view
607607// to have full indexing information populated. This information is required as
608608// we need to keep track of the indexes of each HTLC in order to properly write
609609// the current state to disk, and also to locate the PaymentDescriptor
@@ -612,7 +612,7 @@ func (c *commitment) populateHtlcIndexes(chanType channeldb.ChannelType,
612612 cltvs []uint32 ) error {
613613
614614 // First, we'll set up some state to allow us to locate the output
615- // index of the all the HTLC's within the commitment transaction. We
615+ // index of the all the HTLCs within the commitment transaction. We
616616 // must keep this index so we can validate the HTLC signatures sent to
617617 // us.
618618 dups := make (map [PaymentHash ][]int32 )
@@ -774,7 +774,7 @@ func (c *commitment) toDiskCommit(ourCommit bool) *channeldb.ChannelCommitment {
774774// diskHtlcToPayDesc converts an HTLC previously written to disk within a
775775// commitment state to the form required to manipulate in memory within the
776776// commitment struct and updateLog. This function is used when we need to
777- // restore commitment state written do disk back into memory once we need to
777+ // restore commitment state written to disk back into memory once we need to
778778// restart a channel session.
779779func (lc * LightningChannel ) diskHtlcToPayDesc (feeRate chainfee.SatPerKWeight ,
780780 commitHeight uint64 , htlc * channeldb.HTLC , localCommitKeys ,
@@ -791,7 +791,7 @@ func (lc *LightningChannel) diskHtlcToPayDesc(feeRate chainfee.SatPerKWeight,
791791 chanType = lc .channelState .ChanType
792792 )
793793
794- // If the either outputs is dust from the local or remote node's
794+ // If the either output is dust from the local or remote node's
795795 // perspective, then we don't need to generate the scripts as we only
796796 // generate them in order to locate the outputs within the commitment
797797 // transaction. As we'll mark dust with a special output index in the
@@ -1234,8 +1234,8 @@ func compactLogs(ourLog, theirLog *updateLog,
12341234//
12351235// The state machine has for main methods:
12361236// - .SignNextCommitment()
1237- // - Called one one wishes to sign the next commitment, either initiating a
1238- // new state update, or responding to a received commitment.
1237+ // - Called once when one wishes to sign the next commitment, either
1238+ // initiating a new state update, or responding to a received commitment.
12391239// - .ReceiveNewCommitment()
12401240// - Called upon receipt of a new commitment from the remote party. If the
12411241// new commitment is valid, then a revocation should immediately be
@@ -2879,7 +2879,7 @@ func createBreachRetributionLegacy(revokedLog *channeldb.ChannelCommitment,
28792879// HtlcIsDust determines if an HTLC output is dust or not depending on two
28802880// bits: if the HTLC is incoming and if the HTLC will be placed on our
28812881// commitment transaction, or theirs. These two pieces of information are
2882- // require as we currently used second-level HTLC transactions as off-chain
2882+ // required as we currently used second-level HTLC transactions as off-chain
28832883// covenants. Depending on the two bits, we'll either be using a timeout or
28842884// success transaction which have different weights.
28852885func HtlcIsDust (chanType channeldb.ChannelType ,
0 commit comments