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

Bump golangci for callbacks, fix complaints from unparam. #4417

Merged
merged 2 commits into from
Aug 22, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/callbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: golangci/[email protected]
with:
version: v1.53.3
version: v1.54.2
DimitrisJim marked this conversation as resolved.
Show resolved Hide resolved
args: --timeout 5m
working-directory: modules/apps/callbacks

Expand Down
6 changes: 3 additions & 3 deletions modules/apps/callbacks/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ func (s *CallbacksTestSuite) TestProcessCallback() {
func() {
executionGas := callbackData.ExecutionGasLimit
expGasConsumed = executionGas
callbackExecutor = func(cachedCtx sdk.Context) error {
callbackExecutor = func(cachedCtx sdk.Context) error { //nolint:unparam
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how are these considered unused params?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its crying because we return nil here so in a sense complaining that returning err isn't needed. Don't ask me to rationalize for a linter tho

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gross

cachedCtx.GasMeter().ConsumeGas(expGasConsumed+1, "callbackExecutor gas consumption")
return nil
}
Expand Down Expand Up @@ -811,7 +811,7 @@ func (s *CallbacksTestSuite) TestProcessCallback() {
executionGas := callbackData.ExecutionGasLimit
callbackData.CommitGasLimit = executionGas + 1
expGasConsumed = executionGas
callbackExecutor = func(cachedCtx sdk.Context) error {
callbackExecutor = func(cachedCtx sdk.Context) error { //nolint:unparam
cachedCtx.GasMeter().ConsumeGas(executionGas+1, "callbackExecutor oog panic")
return nil
}
Expand Down Expand Up @@ -843,7 +843,7 @@ func (s *CallbacksTestSuite) TestProcessCallback() {
ctx = s.chainB.GetContext()

// set a callback executor that will always succeed after consuming expGasConsumed
callbackExecutor = func(cachedCtx sdk.Context) error {
callbackExecutor = func(cachedCtx sdk.Context) error { //nolint:unparam
cachedCtx.GasMeter().ConsumeGas(expGasConsumed, "callbackExecutor gas consumption")
return nil
}
Expand Down