chore: fix some typos in comments (#11892)

Signed-off-by: writegr <wellweek@outlook.com>
This commit is contained in:
writegr 2024-04-18 16:34:20 +08:00 committed by GitHub
parent 1cdca19a85
commit 52a190aa7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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()

View File

@ -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
}

View File

@ -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)