From cee77aa41527239a93f851a8eefea4d698483dd0 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 30 Apr 2024 13:49:46 +1000 Subject: [PATCH] chore: remove duplicate words in strings and comments --- api/api_full.go | 2 +- api/v0api/full.go | 2 +- build/builtin_actors.go | 4 ++-- build/openrpc/full.json | 2 +- chain/events/filter/index.go | 2 +- chain/messagepool/selection.go | 2 +- chain/store/checkpoint_test.go | 2 +- documentation/en/api-v0-methods.md | 2 +- documentation/en/api-v1-unstable-methods.md | 2 +- journal/alerting/alerts.go | 2 +- metrics/metrics.go | 8 ++++---- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index 85233a712..bbfcae0a2 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -335,7 +335,7 @@ type FullNode interface { WalletVerify(context.Context, address.Address, []byte, *crypto.Signature) (bool, error) //perm:read // WalletDefaultAddress returns the address marked as default in the wallet. WalletDefaultAddress(context.Context) (address.Address, error) //perm:write - // WalletSetDefault marks the given address as as the default one. + // WalletSetDefault marks the given address as the default one. WalletSetDefault(context.Context, address.Address) error //perm:write // WalletExport returns the private key of an address in the wallet. WalletExport(context.Context, address.Address) (*types.KeyInfo, error) //perm:admin diff --git a/api/v0api/full.go b/api/v0api/full.go index db84ddc87..b61fc1570 100644 --- a/api/v0api/full.go +++ b/api/v0api/full.go @@ -293,7 +293,7 @@ type FullNode interface { WalletVerify(context.Context, address.Address, []byte, *crypto.Signature) (bool, error) //perm:read // WalletDefaultAddress returns the address marked as default in the wallet. WalletDefaultAddress(context.Context) (address.Address, error) //perm:write - // WalletSetDefault marks the given address as as the default one. + // WalletSetDefault marks the given address as the default one. WalletSetDefault(context.Context, address.Address) error //perm:write // WalletExport returns the private key of an address in the wallet. WalletExport(context.Context, address.Address) (*types.KeyInfo, error) //perm:admin diff --git a/build/builtin_actors.go b/build/builtin_actors.go index 6aace0bec..1cc43c374 100644 --- a/build/builtin_actors.go +++ b/build/builtin_actors.go @@ -145,10 +145,10 @@ func readEmbeddedBuiltinActorsMetadata(bundle string) ([]*BuiltinActorsMetadata, ) if !strings.HasPrefix(bundle, "v") { - return nil, xerrors.Errorf("bundle bundle '%q' doesn't start with a 'v'", bundle) + return nil, xerrors.Errorf("bundle '%q' doesn't start with a 'v'", bundle) } if !strings.HasSuffix(bundle, archiveExt) { - return nil, xerrors.Errorf("bundle bundle '%q' doesn't end with '%s'", bundle, archiveExt) + return nil, xerrors.Errorf("bundle '%q' doesn't end with '%s'", bundle, archiveExt) } version, err := strconv.ParseInt(bundle[1:len(bundle)-len(archiveExt)], 10, 0) if err != nil { diff --git a/build/openrpc/full.json b/build/openrpc/full.json index 5d422f283..7dabd7752 100644 --- a/build/openrpc/full.json +++ b/build/openrpc/full.json @@ -26382,7 +26382,7 @@ { "name": "Filecoin.WalletSetDefault", "description": "```go\nfunc (s *FullNodeStruct) WalletSetDefault(p0 context.Context, p1 address.Address) error {\n\tif s.Internal.WalletSetDefault == nil {\n\t\treturn ErrNotSupported\n\t}\n\treturn s.Internal.WalletSetDefault(p0, p1)\n}\n```", - "summary": "WalletSetDefault marks the given address as as the default one.\n", + "summary": "WalletSetDefault marks the given address as the default one.\n", "paramStructure": "by-position", "params": [ { diff --git a/chain/events/filter/index.go b/chain/events/filter/index.go index 75f5b1c30..7b3cae969 100644 --- a/chain/events/filter/index.go +++ b/chain/events/filter/index.go @@ -478,7 +478,7 @@ func (ei *EventIndex) CollectEvents(ctx context.Context, te *TipSetEvents, rever // rollback the transaction (a no-op if the transaction was already committed) defer func() { _ = tx.Rollback() }() - // 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/chain/messagepool/selection.go b/chain/messagepool/selection.go index 163bd76f9..0d0ed3cba 100644 --- a/chain/messagepool/selection.go +++ b/chain/messagepool/selection.go @@ -400,7 +400,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/chain/store/checkpoint_test.go b/chain/store/checkpoint_test.go index a30c4d860..8b775d334 100644 --- a/chain/store/checkpoint_test.go +++ b/chain/store/checkpoint_test.go @@ -52,7 +52,7 @@ func TestChainCheckpoint(t *testing.T) { head = cs.GetHeaviestTipSet() require.True(t, head.Equals(checkpoint)) - // Let the second miner miner mine a fork + // Let the second miner mine a fork last = checkpointParents for i := 0; i < 4; i++ { ts, err := cg.NextTipSetFromMiners(last, cg.Miners[1:], 0) diff --git a/documentation/en/api-v0-methods.md b/documentation/en/api-v0-methods.md index eedfd227e..9a8c4821b 100644 --- a/documentation/en/api-v0-methods.md +++ b/documentation/en/api-v0-methods.md @@ -7594,7 +7594,7 @@ Inputs: Response: `"f01234"` ### WalletSetDefault -WalletSetDefault marks the given address as as the default one. +WalletSetDefault marks the given address as the default one. Perms: write diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index dee290b34..8dab4f35f 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -9284,7 +9284,7 @@ Inputs: Response: `"f01234"` ### WalletSetDefault -WalletSetDefault marks the given address as as the default one. +WalletSetDefault marks the given address as the default one. Perms: write diff --git a/journal/alerting/alerts.go b/journal/alerting/alerts.go index 290d06e2a..1d6dd0a5c 100644 --- a/journal/alerting/alerts.go +++ b/journal/alerting/alerts.go @@ -95,7 +95,7 @@ func (a *Alerting) update(at AlertType, message interface{}, upd func(Alert, jso }{ AlertError: err.Error(), }) - log.Errorw("marshaling marshaling error failed", "type", at, "error", err) + log.Errorw("marshaling error failed", "type", at, "error", err) } a.alerts[at] = upd(alert, rawMsg) diff --git a/metrics/metrics.go b/metrics/metrics.go index 5d6ba79ec..85b9d82ec 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -190,11 +190,11 @@ var ( RcmgrAllowPeer = stats.Int64("rcmgr/allow_peer", "Number of allowed peer connections", stats.UnitDimensionless) RcmgrBlockPeer = stats.Int64("rcmgr/block_peer", "Number of blocked peer connections", stats.UnitDimensionless) RcmgrAllowProto = stats.Int64("rcmgr/allow_proto", "Number of allowed streams attached to a protocol", stats.UnitDimensionless) - RcmgrBlockProto = stats.Int64("rcmgr/block_proto", "Number of blocked blocked streams attached to a protocol", stats.UnitDimensionless) - RcmgrBlockProtoPeer = stats.Int64("rcmgr/block_proto", "Number of blocked blocked streams attached to a protocol for a specific peer", stats.UnitDimensionless) + RcmgrBlockProto = stats.Int64("rcmgr/block_proto", "Number of blocked streams attached to a protocol", stats.UnitDimensionless) + RcmgrBlockProtoPeer = stats.Int64("rcmgr/block_proto", "Number of blocked streams attached to a protocol for a specific peer", stats.UnitDimensionless) RcmgrAllowSvc = stats.Int64("rcmgr/allow_svc", "Number of allowed streams attached to a service", stats.UnitDimensionless) - RcmgrBlockSvc = stats.Int64("rcmgr/block_svc", "Number of blocked blocked streams attached to a service", stats.UnitDimensionless) - RcmgrBlockSvcPeer = stats.Int64("rcmgr/block_svc", "Number of blocked blocked streams attached to a service for a specific peer", stats.UnitDimensionless) + RcmgrBlockSvc = stats.Int64("rcmgr/block_svc", "Number of blocked streams attached to a service", stats.UnitDimensionless) + RcmgrBlockSvcPeer = stats.Int64("rcmgr/block_svc", "Number of blocked streams attached to a service for a specific peer", stats.UnitDimensionless) RcmgrAllowMem = stats.Int64("rcmgr/allow_mem", "Number of allowed memory reservations", stats.UnitDimensionless) RcmgrBlockMem = stats.Int64("rcmgr/block_mem", "Number of blocked memory reservations", stats.UnitDimensionless)