From 52a190aa7bb059ef6d65b93bf8739a74e50cf55f Mon Sep 17 00:00:00 2001 From: writegr <167099595+writegr@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:34:20 +0800 Subject: [PATCH] chore: fix some typos in comments (#11892) Signed-off-by: writegr --- chain/sub/ratelimit/window.go | 2 +- cmd/tvx/extract_tipset.go | 2 +- node/config/load_test.go | 2 +- storage/pipeline/fsm_events.go | 2 +- tools/stats/sync/sync.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chain/sub/ratelimit/window.go b/chain/sub/ratelimit/window.go index 0756e8998..8350b109e 100644 --- a/chain/sub/ratelimit/window.go +++ b/chain/sub/ratelimit/window.go @@ -24,7 +24,7 @@ func NewWindow(capacity int, size time.Duration) *Window { } // Add attempts to append a new timestamp into the current window. Previously -// added values that are not not within `size` difference from the value being +// added values that are not within `size` difference from the value being // added are first removed. Add fails if adding the value would cause the // window to exceed capacity. func (w *Window) Add() error { diff --git a/cmd/tvx/extract_tipset.go b/cmd/tvx/extract_tipset.go index 553961f44..0be4c04b0 100644 --- a/cmd/tvx/extract_tipset.go +++ b/cmd/tvx/extract_tipset.go @@ -57,7 +57,7 @@ func doExtractTipset(opts extractOpts) error { return err } - // are are squashing all tipsets into a single multi-tipset vector? + // are squashing all tipsets into a single multi-tipset vector? if opts.squash { vector, err := extractTipsets(ctx, tss...) if err != nil { diff --git a/node/config/load_test.go b/node/config/load_test.go index 2edef259b..2eeacb7d5 100644 --- a/node/config/load_test.go +++ b/node/config/load_test.go @@ -53,7 +53,7 @@ func TestParitalConfig(t *testing.T) { f, err := os.CreateTemp("", "config-*.toml") fname := f.Name() - assert.NoError(err, "tmp file shold not error") + assert.NoError(err, "tmp file should not error") _, err = f.WriteString(cfgString) assert.NoError(err, "writing to tmp file should not error") err = f.Close() diff --git a/storage/pipeline/fsm_events.go b/storage/pipeline/fsm_events.go index 94cd53e82..63ebdb9d5 100644 --- a/storage/pipeline/fsm_events.go +++ b/storage/pipeline/fsm_events.go @@ -21,7 +21,7 @@ type mutator interface { // globalMutator is an event which can apply in every state type globalMutator interface { - // applyGlobal applies the event to the state. If if returns true, + // applyGlobal applies the event to the state. If it returns true, // event processing should be interrupted applyGlobal(state *SectorInfo) bool } diff --git a/tools/stats/sync/sync.go b/tools/stats/sync/sync.go index c8db1c543..5a925d4cb 100644 --- a/tools/stats/sync/sync.go +++ b/tools/stats/sync/sync.go @@ -91,7 +91,7 @@ type BufferedTipsetChannelApi interface { } // BufferedTipsetChannel returns an unbuffered channel of tipsets. Buffering occurs internally to handle revert -// ChainNotify changes. The returned channel can output tipsets at the same height twice if a reorg larger the the +// ChainNotify changes. The returned channel can output tipsets at the same height twice if a reorg larger the // provided `size` occurs. func BufferedTipsetChannel(ctx context.Context, api BufferedTipsetChannelApi, lastHeight abi.ChainEpoch, size int) (<-chan *types.TipSet, error) { chmain := make(chan *types.TipSet)