From 57f711543716ca381e936d013619af3e3c2f4e14 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 13 Aug 2020 07:33:52 +0800 Subject: [PATCH] trivial: typo fix --- chainntnfs/interface.go | 2 +- chainntnfs/txnotifier.go | 2 +- contractcourt/briefcase.go | 2 +- contractcourt/chain_arbitrator.go | 6 +++--- contractcourt/chain_watcher.go | 4 ++-- contractcourt/channel_arbitrator.go | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chainntnfs/interface.go b/chainntnfs/interface.go index c224181c..4017d853 100644 --- a/chainntnfs/interface.go +++ b/chainntnfs/interface.go @@ -482,7 +482,7 @@ func GetClientMissedBlocks(chainConn ChainConn, clientBestBlock *BlockEpoch, return missedBlocks, nil } -// RewindChain handles internal state updates for the notifier's TxNotifier It +// RewindChain handles internal state updates for the notifier's TxNotifier. It // has no effect if given a height greater than or equal to our current best // known height. It returns the new best block for the notifier. func RewindChain(chainConn ChainConn, txNotifier *TxNotifier, diff --git a/chainntnfs/txnotifier.go b/chainntnfs/txnotifier.go index 6a3aecd7..ab19fb93 100644 --- a/chainntnfs/txnotifier.go +++ b/chainntnfs/txnotifier.go @@ -262,7 +262,7 @@ type HistoricalConfDispatch struct { // inclusion of within the chain. ConfRequest - // StartHeight specifies the block height at which to being the + // StartHeight specifies the block height at which to begin the // historical rescan. StartHeight uint32 diff --git a/contractcourt/briefcase.go b/contractcourt/briefcase.go index 1685401c..3c0aac63 100644 --- a/contractcourt/briefcase.go +++ b/contractcourt/briefcase.go @@ -727,7 +727,7 @@ func (b *boltArbitratorLog) FetchContractResolutions() (*ContractResolutions, er numOutgoing uint32 ) - // Next, we'll read out he incoming and outgoing HTLC + // Next, we'll read out the incoming and outgoing HTLC // resolutions. err = binary.Read(resReader, endian, &numIncoming) if err != nil { diff --git a/contractcourt/chain_arbitrator.go b/contractcourt/chain_arbitrator.go index dacbc1f5..427cd36c 100644 --- a/contractcourt/chain_arbitrator.go +++ b/contractcourt/chain_arbitrator.go @@ -59,7 +59,7 @@ type ChainArbitratorConfig struct { // broadcast our commitment transaction if we have incoming htlcs. This // value should be set based on our current fee estimation of the // commitment transaction. We use this to determine when we should - // broadcast instead of the just the HTLC timeout, as we want to ensure + // broadcast instead of just the HTLC timeout, as we want to ensure // that the commitment transaction is already confirmed, by the time the // HTLC expires. Otherwise we may end up not settling the htlc on-chain // because the other party managed to time it out. @@ -89,7 +89,7 @@ type ChainArbitratorConfig struct { DeliverResolutionMsg func(...ResolutionMsg) error // MarkLinkInactive is a function closure that the ChainArbitrator will - // use to mark that active HTLC's shouldn't be attempt ted to be routed + // use to mark that active HTLC's shouldn't be attempted to be routed // over a particular channel. This function will be called in that a // ChannelArbitrator decides that it needs to go to chain in order to // resolve contracts. @@ -157,7 +157,7 @@ type ChainArbitratorConfig struct { // resolution. OnionProcessor OnionProcessor - // PaymentsExpirationGracePeriod indicates is a time window we let the + // PaymentsExpirationGracePeriod indicates a time window we let the // other node to cancel an outgoing htlc that our node has initiated and // has timed out. PaymentsExpirationGracePeriod time.Duration diff --git a/contractcourt/chain_watcher.go b/contractcourt/chain_watcher.go index aab395c6..ee62c0ce 100644 --- a/contractcourt/chain_watcher.go +++ b/contractcourt/chain_watcher.go @@ -500,7 +500,7 @@ func (c *chainWatcher) closeObserver(spendNtfn *chainntnfs.SpendEvent) { select { // We've detected a spend of the channel onchain! Depending on the type - // of spend, we'll act accordingly , so we'll examine the spending + // of spend, we'll act accordingly, so we'll examine the spending // transaction to determine what we should do. // // TODO(Roasbeef): need to be able to ensure this only triggers @@ -568,7 +568,7 @@ func (c *chainWatcher) closeObserver(spendNtfn *chainntnfs.SpendEvent) { // Next, we'll check to see if this is a cooperative channel // closure or not. This is characterized by having an input - // sequence number that's finalized. This won't happen with + // sequence number that's finalized. This won't happen with // regular commitment transactions due to the state hint // encoding scheme. if commitTxBroadcast.TxIn[0].Sequence == wire.MaxTxInSequenceNum { diff --git a/contractcourt/channel_arbitrator.go b/contractcourt/channel_arbitrator.go index b67d2c7c..acc42346 100644 --- a/contractcourt/channel_arbitrator.go +++ b/contractcourt/channel_arbitrator.go @@ -1987,7 +1987,7 @@ func (c *ChannelArbitrator) resolveContract(currentContract ContractResolver) { switch { // If this contract produced another, then this means // the current contract was only able to be partially - // resolved in this step. So we'll not a contract swap + // resolved in this step. So we'll do a contract swap // within our logs: the new contract will take the // place of the old one. case nextContract != nil: @@ -2082,7 +2082,7 @@ func (c *ChannelArbitrator) UpdateContractSignals(newSignals *ContractSignals) { // channelAttendant is the primary goroutine that acts at the judicial // arbitrator between our channel state, the remote channel peer, and the -// blockchain Our judge). This goroutine will ensure that we faithfully execute +// blockchain (Our judge). This goroutine will ensure that we faithfully execute // all clauses of our contract in the case that we need to go on-chain for a // dispute. Currently, two such conditions warrant our intervention: when an // outgoing HTLC is about to timeout, and when we know the pre-image for an