Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Jul 13, 2023
1 parent 25486c4 commit d7fdfa2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion tests/integration/throttle_retry.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package integration

import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"

stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

provider "github.com/cosmos/interchain-security/v3/x/ccv/provider"
providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
Expand Down
3 changes: 2 additions & 1 deletion x/ccv/consumer/keeper/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package keeper_test
import (
"testing"

"github.com/stretchr/testify/require"

testutil "github.com/cosmos/interchain-security/v3/testutil/keeper"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
"github.com/stretchr/testify/require"
)

func TestMigrateConsumerPacketData(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion x/ccv/consumer/keeper/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ func (k Keeper) SendPackets(ctx sdk.Context) {
// in conjunction with the ibc module's execution of "acknowledgePacket",
// according to https://github.com/cosmos/ibc/tree/main/spec/core/ics-004-channel-and-packet-semantics#processing-acknowledgements
func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, ack channeltypes.Acknowledgement) error {

if res := ack.GetResult(); res != nil {
if len(res) != 1 {
k.Logger(ctx).Error("recv invalid ack; expected length 1", "channel", packet.SourceChannel, "ack", res)
Expand Down
2 changes: 0 additions & 2 deletions x/ccv/consumer/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ func TestOnAcknowledgementPacketError(t *testing.T) {
// TestOnAcknowledgementPacketResult tests application logic for RESULT acknowledgments of sent VSCMatured and Slash packets
// in conjunction with the ibc module's execution of "acknowledgePacket",
func TestOnAcknowledgementPacketResult(t *testing.T) {

// Setup
consumerKeeper, ctx, ctrl, _ := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t))
defer ctrl.Finish()
Expand Down Expand Up @@ -429,7 +428,6 @@ func TestOnAcknowledgementPacketResult(t *testing.T) {
}

func setupSlashBeforeVscMatured(ctx sdk.Context, k *consumerkeeper.Keeper) {

// clear old state
k.ClearSlashRecord(ctx)
k.DeleteAllPendingDataPackets(ctx)
Expand Down
1 change: 1 addition & 0 deletions x/ccv/consumer/keeper/throttle_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"time"

sdktypes "github.com/cosmos/cosmos-sdk/types"

consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
)

Expand Down
3 changes: 2 additions & 1 deletion x/ccv/consumer/keeper/throttle_retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

testutil "github.com/cosmos/interchain-security/v3/testutil/keeper"
consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
"github.com/stretchr/testify/require"
)

func TestPacketSendingPermitted(t *testing.T) {
Expand Down

0 comments on commit d7fdfa2

Please sign in to comment.