Skip to content

Commit f117c7c

Browse files
committed
chore: make linter happy
1 parent fdc9db9 commit f117c7c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

x/logic/keeper/interpreter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package keeper
33
import (
44
"context"
55
"fmt"
6-
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
76
"io"
87
"math"
98
"strings"
@@ -17,6 +16,7 @@ import (
1716
storetypes "cosmossdk.io/store/types"
1817

1918
sdk "github.com/cosmos/cosmos-sdk/types"
19+
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
2020

2121
"github.com/axone-protocol/axoned/v8/x/logic/fs/filtered"
2222
"github.com/axone-protocol/axoned/v8/x/logic/interpreter"

x/logic/util/prolog.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ package util
22

33
import (
44
"context"
5-
errorsmod "cosmossdk.io/errors"
65
"errors"
7-
sdk "github.com/cosmos/cosmos-sdk/types"
8-
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
96
"strings"
107

118
"github.com/ichiban/prolog"
129
"github.com/ichiban/prolog/engine"
1310
"github.com/samber/lo"
1411

12+
errorsmod "cosmossdk.io/errors"
1513
sdkmath "cosmossdk.io/math"
1614

15+
sdk "github.com/cosmos/cosmos-sdk/types"
16+
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
17+
1718
"github.com/axone-protocol/axoned/v8/x/logic/types"
1819
)
1920

@@ -52,13 +53,14 @@ func QueryInterpreter(
5253
if callErr != nil {
5354
if sdkmath.NewUint(uint64(len(results))).LT(solutionsLimit) {
5455
// error is not part of the look-ahead and should be included in the solutions
55-
if errors.Is(callErr, sdkerrors.ErrOutOfGas) {
56+
switch {
57+
case errors.Is(callErr, sdkerrors.ErrOutOfGas):
5658
return nil, callErr
57-
} else if sdk.UnwrapSDKContext(ctx).GasMeter().IsOutOfGas() {
59+
case sdk.UnwrapSDKContext(ctx).GasMeter().IsOutOfGas():
5860
return nil, errorsmod.Wrapf(sdkerrors.ErrOutOfGas, "out of gas in location: %v", callErr.Error())
61+
default:
62+
results = append(results, types.Result{Error: callErr.Error()})
5963
}
60-
61-
results = append(results, types.Result{Error: callErr.Error()})
6264
} else {
6365
// error is part of the look-ahead, so let's consider that there's one more solution
6466
count = count.Incr()

0 commit comments

Comments
 (0)