From 7dd0c3e920d55b19da5f50710ce5d983a4eb068e Mon Sep 17 00:00:00 2001 From: Peter Nose Date: Wed, 23 Oct 2024 11:19:34 +0200 Subject: [PATCH] go: Fix comments --- .changelog/5920.trivial.md | 0 docs/development-setup/oasis-net-runner.md | 2 +- go/consensus/cometbft/full/full.go | 2 +- go/consensus/cometbft/light/internal.go | 4 ++-- go/consensus/cometbft/light/service.go | 4 ++-- go/oasis-test-runner/cmd/root.go | 2 +- .../scenario/e2e/runtime/storage_sync_inconsistent.go | 2 +- go/p2p/dispatch.go | 2 +- go/vault/api/methods.go | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 .changelog/5920.trivial.md diff --git a/.changelog/5920.trivial.md b/.changelog/5920.trivial.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docs/development-setup/oasis-net-runner.md b/docs/development-setup/oasis-net-runner.md index 42c3ea2c913..3e64053c574 100644 --- a/docs/development-setup/oasis-net-runner.md +++ b/docs/development-setup/oasis-net-runner.md @@ -84,7 +84,7 @@ To run an Oasis node under SGX follow the same steps as for non-SGX, except the If the above does not appear to work (e.g., when you run the client, it appears to hang and not make any progress) usually the best place to start debugging is looking at the various node logs which are stored under a directory starting -with `/tmp/oasis-net-runner` (unless overriden via `--basedir` options). +with `/tmp/oasis-net-runner` (unless overridden via `--basedir` options). Specifically look at `node.log` and `console.log` files located in directories for each of the nodes comprising the local network. diff --git a/go/consensus/cometbft/full/full.go b/go/consensus/cometbft/full/full.go index 2b94e881d96..17174655622 100644 --- a/go/consensus/cometbft/full/full.go +++ b/go/consensus/cometbft/full/full.go @@ -688,7 +688,7 @@ func (t *fullService) lazyInit() error { // nolint: gocyclo // else is setup. t.startFn = func() (err error) { defer func() { - // The node constructor can panic early in case an error occurrs during block replay as + // The node constructor can panic early in case an error occurs during block replay as // the fail monitor is not yet initialized in that case. Propagate the error. if p := recover(); p != nil { switch pt := p.(type) { diff --git a/go/consensus/cometbft/light/internal.go b/go/consensus/cometbft/light/internal.go index 7c6836c244d..6d344e082f3 100644 --- a/go/consensus/cometbft/light/internal.go +++ b/go/consensus/cometbft/light/internal.go @@ -61,7 +61,7 @@ func tryProviders[R any]( return result, nil, err } -// GetStoredBlock implements api.Client. +// GetStoredLightBlock implements api.Client. func (lc *lightClient) GetStoredLightBlock(height int64) (*consensus.LightBlock, error) { clb, err := lc.tmc.TrustedLightBlock(height) if err != nil { @@ -98,7 +98,7 @@ func (lc *lightClient) GetVerifiedLightBlock(ctx context.Context, height int64) return lc.tmc.VerifyLightBlockAtHeight(ctx, height, time.Now()) } -// GetVerifiedLightBlock implements Client. +// GetVerifiedParameters implements Client. func (lc *lightClient) GetVerifiedParameters(ctx context.Context, height int64) (*cmtproto.ConsensusParams, error) { p, pf, err := lc.GetParameters(ctx, height) if err != nil { diff --git a/go/consensus/cometbft/light/service.go b/go/consensus/cometbft/light/service.go index 0de447eac9c..9e0de83b9c7 100644 --- a/go/consensus/cometbft/light/service.go +++ b/go/consensus/cometbft/light/service.go @@ -258,7 +258,7 @@ func (c *client) worker() { } } -// GetStoredBlock implements api.Client. +// GetStoredLightBlock implements api.Client. func (c *client) GetStoredLightBlock(height int64) (*consensus.LightBlock, error) { clb, err := c.store.LightBlock(height) if err != nil { @@ -366,7 +366,7 @@ func (c *client) GetVerifiedLightBlock(ctx context.Context, height int64) (*cmtt return c.lc.GetVerifiedLightBlock(ctx, height) } -// GetVerifiedLightBlock implements Client. +// GetVerifiedParameters implements Client. func (c *client) GetVerifiedParameters(ctx context.Context, height int64) (*cmtproto.ConsensusParams, error) { select { case <-c.initCh: diff --git a/go/oasis-test-runner/cmd/root.go b/go/oasis-test-runner/cmd/root.go index 2f3c02843da..3adb878f66f 100644 --- a/go/oasis-test-runner/cmd/root.go +++ b/go/oasis-test-runner/cmd/root.go @@ -165,7 +165,7 @@ func parseScenarioParams(toRun []scenario.Scenario) (map[string][]scenario.Scena return scListsToRun, nil } -// generalizedScenarioNames returns list of generalized scenario names from the +// generalizedScenarioName returns list of generalized scenario names from the // original name to most general name. func generalizedScenarioName(name string) []string { dirs := strings.Split(name, "/") diff --git a/go/oasis-test-runner/scenario/e2e/runtime/storage_sync_inconsistent.go b/go/oasis-test-runner/scenario/e2e/runtime/storage_sync_inconsistent.go index 50e50a2a0c0..20bba8eedce 100644 --- a/go/oasis-test-runner/scenario/e2e/runtime/storage_sync_inconsistent.go +++ b/go/oasis-test-runner/scenario/e2e/runtime/storage_sync_inconsistent.go @@ -189,7 +189,7 @@ func (sc *storageSyncInconsistentImpl) Run(ctx context.Context, childEnv *env.En } // No need to wait, client is dead at this point. Unfortunately - // the error didn't indicate cancelation though. + // the error didn't indicate cancellation though. return sc.Net.CheckLogWatchers() } diff --git a/go/p2p/dispatch.go b/go/p2p/dispatch.go index 64eabd1ce0a..2601fd608a6 100644 --- a/go/p2p/dispatch.go +++ b/go/p2p/dispatch.go @@ -258,7 +258,7 @@ func newTopicHandler(p *p2p, topicID string, handler api.Handler) (*topicHandler } h := &topicHandler{ - ctx: p.ctx, // TODO: Should this support individual cancelation? + ctx: p.ctx, // TODO: Should this support individual cancellation? p2p: p, topic: topic, host: p.host, diff --git a/go/vault/api/methods.go b/go/vault/api/methods.go index fe5ccebdbcc..5b0d90e5e00 100644 --- a/go/vault/api/methods.go +++ b/go/vault/api/methods.go @@ -97,7 +97,7 @@ func (a AuthorizeAction) PrettyType() (interface{}, error) { return a, nil } -// CancelAction is an action cancelation call body. +// CancelAction is an action cancellation call body. type CancelAction struct { // Vault is the address of the target vault. Vault staking.Address `json:"vault"` @@ -105,7 +105,7 @@ type CancelAction struct { Nonce uint64 `json:"nonce"` } -// Validate validates the action cancelation call. +// Validate validates the action cancellation call. func (a *CancelAction) Validate() error { if !a.Vault.IsValid() { return fmt.Errorf("invalid vault address")