Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go: Fix comments #5920

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .changelog/5920.trivial.md
Empty file.
2 changes: 1 addition & 1 deletion docs/development-setup/oasis-net-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion go/consensus/cometbft/full/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions go/consensus/cometbft/light/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions go/consensus/cometbft/light/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion go/oasis-test-runner/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
2 changes: 1 addition & 1 deletion go/p2p/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions go/vault/api/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ 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"`
// Nonce is the action nonce.
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")
Expand Down
Loading