From 49c6e8b61db6e7299c7a0a1eeb4123cf31f8d86b Mon Sep 17 00:00:00 2001 From: lfz941 Date: Fri, 28 Jun 2024 11:17:51 +0800 Subject: [PATCH] remove duplicate words --- pkg/events/filter/index.go | 4 ++-- pkg/messagepool/messagepool.go | 2 +- pkg/messagepool/selection.go | 2 +- pkg/vm/runtime/runtime.go | 2 +- pkg/wallet/dsbackend.go | 2 +- pkg/wallet/wallet.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/events/filter/index.go b/pkg/events/filter/index.go index 7249133abc..19a8dee7a6 100644 --- a/pkg/events/filter/index.go +++ b/pkg/events/filter/index.go @@ -312,7 +312,7 @@ func NewEventIndex(ctx context.Context, path string, chainStore *chain.Store) (* return nil, fmt.Errorf("could not migrate sql data to version 2: %w", err) } - // to upgrade to version version 2 we only need to create an index on the event table + // to upgrade to version 2 we only need to create an index on the event table // which means we can just recreate the schema (it will not have any effect on existing data) for _, ddl := range ddls { if _, err := db.Exec(ddl); err != nil { @@ -354,7 +354,7 @@ func (ei *EventIndex) CollectEvents(ctx context.Context, te *TipSetEvents, rever // rollback the transaction (a no-op if the transaction was already committed) defer tx.Rollback() //nolint:errcheck - // lets handle the revert case first, since its simpler and we can simply mark all events events in this tipset as reverted and return + // lets handle the revert case first, since its simpler and we can simply mark all events in this tipset as reverted and return if revert { _, err = tx.Stmt(ei.stmtRevertEventsInTipset).Exec(te.msgTS.Height(), te.msgTS.Key().Bytes()) if err != nil { diff --git a/pkg/messagepool/messagepool.go b/pkg/messagepool/messagepool.go index f9ea785568..4434652e00 100644 --- a/pkg/messagepool/messagepool.go +++ b/pkg/messagepool/messagepool.go @@ -1636,7 +1636,7 @@ func (mp *MessagePool) Updates(ctx context.Context) (<-chan types.MpoolUpdate, e func (mp *MessagePool) loadLocal(ctx context.Context) error { if val := os.Getenv("VENUS_DISABLE_LOCAL_MESSAGE"); val != "" { - log.Warnf("receive environment to disable local local message") + log.Warnf("receive environment to disable local message") return nil } diff --git a/pkg/messagepool/selection.go b/pkg/messagepool/selection.go index 8b19098af3..539a4f6fbb 100644 --- a/pkg/messagepool/selection.go +++ b/pkg/messagepool/selection.go @@ -398,7 +398,7 @@ tailLoop: continue tailLoop } - // the merge loop ended after processing all the chains and we we probably have still + // the merge loop ended after processing all the chains and we probably have still // gas to spare; end the loop. break } diff --git a/pkg/vm/runtime/runtime.go b/pkg/vm/runtime/runtime.go index f2cb556366..a19d2281ee 100644 --- a/pkg/vm/runtime/runtime.go +++ b/pkg/vm/runtime/runtime.go @@ -101,7 +101,7 @@ func Abort(code exitcode.ExitCode) { panic(ExecutionPanic{code: code}) } -// Abortf will stop the LegacyVM execution and return an the error to the caller. +// Abortf will stop the LegacyVM execution and return an error to the caller. func Abortf(code exitcode.ExitCode, msg string, args ...interface{}) { panic(ExecutionPanic{code: code, msg: fmt.Sprintf(msg, args...)}) } diff --git a/pkg/wallet/dsbackend.go b/pkg/wallet/dsbackend.go index 34e851ae48..2ff8ca6e8e 100644 --- a/pkg/wallet/dsbackend.go +++ b/pkg/wallet/dsbackend.go @@ -260,7 +260,7 @@ func (backend *DSBackend) GetKeyInfo(ctx context.Context, addr address.Address) return key.KeyInfo, nil } -// GetKeyInfoPassphrase get private private key from wallet, get encrypt byte from db and decrypto it with password +// GetKeyInfoPassphrase get private key from wallet, get encrypt byte from db and decrypto it with password func (backend *DSBackend) GetKeyInfoPassphrase(ctx context.Context, addr address.Address, password []byte) (*key.KeyInfo, error) { if !backend.HasAddress(ctx, addr) { return nil, errors.New("backend does not contain address") diff --git a/pkg/wallet/wallet.go b/pkg/wallet/wallet.go index d198414d17..4148b243b5 100644 --- a/pkg/wallet/wallet.go +++ b/pkg/wallet/wallet.go @@ -252,7 +252,7 @@ func (w *Wallet) DSBacked() (*DSBackend, error) { return (backends[0]).(*DSBackend), nil } -// LockWallet lock lock wallet +// LockWallet locks wallet func (w *Wallet) LockWallet(ctx context.Context) error { backend, err := w.DSBacked() if err != nil {