Skip to content

Commit

Permalink
gofumpt to reduce total number of changes versus v5 (cosmos#1734)
Browse files Browse the repository at this point in the history
* build(deps): bump actions/setup-go from 2.1.5 to 2.2.0

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.5 to 2.2.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v2.1.5...v2.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* gofumpt to reduce total number of changes versus v5

* change IncentivizeAcknowledgement to declaration

* ibc_middleware fix

* Delete .gitpod.yml

sorry about this!

* gofumpt -w -l .

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
faddat and dependabot[bot] committed Jul 27, 2022
1 parent af4e651 commit 48c456d
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 20 deletions.
1 change: 0 additions & 1 deletion cmd/build_test_matrix/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func getGithubActionMatrixForTests(e2eRootDirectory string) (GithubActionTestMat

return nil
})

if err != nil {
return GithubActionTestMatrix{}, err
}
Expand Down
1 change: 0 additions & 1 deletion cmd/build_test_matrix/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func assertGithubActionTestMatricesEqual(t *testing.T, expected, actual GithubAc
}

func goTestFileContents(suiteName, fnName1, fnName2 string) string {

replacedSuiteName := strings.ReplaceAll(`package foo
func TestSuiteName(t *testing.T) {
Expand Down
6 changes: 2 additions & 4 deletions e2e/fee_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ type FeeMiddlewareTestSuite struct {

// RegisterCounterPartyPayee broadcasts a MsgRegisterCounterpartyPayee message.
func (s *FeeMiddlewareTestSuite) RegisterCounterPartyPayee(ctx context.Context, chain *cosmos.CosmosChain,
user broadcast.User, portID, channelID, relayerAddr, counterpartyPayeeAddr string) (sdk.TxResponse, error) {
user broadcast.User, portID, channelID, relayerAddr, counterpartyPayeeAddr string,
) (sdk.TxResponse, error) {
msg := feetypes.NewMsgRegisterCounterpartyPayee(portID, channelID, relayerAddr, counterpartyPayeeAddr)
return s.BroadcastMessages(ctx, chain, user, msg)
}
Expand All @@ -43,7 +44,6 @@ func (s *FeeMiddlewareTestSuite) QueryCounterPartyPayee(ctx context.Context, cha
ChannelId: channelID,
Relayer: relayerAddress,
})

if err != nil {
return "", err
}
Expand Down Expand Up @@ -372,7 +372,6 @@ func (s *FeeMiddlewareTestSuite) TestMsgPayPacketFee_SingleSender_TimesOut() {
})

t.Run("pay packet fee", func(t *testing.T) {

packetId := channeltypes.NewPacketId(channelA.PortID, channelA.ChannelID, 1)
packetFee := feetypes.NewPacketFee(testFee, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), nil)

Expand Down Expand Up @@ -407,7 +406,6 @@ func (s *FeeMiddlewareTestSuite) TestMsgPayPacketFee_SingleSender_TimesOut() {
expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount - testFee.Total().AmountOf(chainADenom).Int64()
s.Require().Equal(expected, actualBalance)
})

})

t.Run("start relayer", func(t *testing.T) {
Expand Down
5 changes: 2 additions & 3 deletions modules/apps/29-fee/ibc_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ func (im IBCMiddleware) OnAcknowledgementPacket(
if !im.keeper.IsFeeEnabled(ctx, packet.SourcePort, packet.SourceChannel) {
return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer)
}

var ack = &types.IncentivizedAcknowledgement{}
if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, ack); err != nil {
var ack types.IncentivizedAcknowledgement
if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, &ack); err != nil {
return sdkerrors.Wrapf(err, "cannot unmarshal ICS-29 incentivized packet acknowledgement: %v", ack)
}

Expand Down
4 changes: 1 addition & 3 deletions modules/apps/29-fee/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import (
)

func (suite *KeeperTestSuite) TestRegisterPayee() {
var (
msg *types.MsgRegisterPayee
)
var msg *types.MsgRegisterPayee

testCases := []struct {
name string
Expand Down
4 changes: 1 addition & 3 deletions modules/apps/transfer/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ func (suite *KeeperTestSuite) TestQueryDenomHash() {
}

func (suite *KeeperTestSuite) TestEscrowAddress() {
var (
req *types.QueryEscrowAddressRequest
)
var req *types.QueryEscrowAddressRequest

testCases := []struct {
msg string
Expand Down
1 change: 0 additions & 1 deletion modules/apps/transfer/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func NewMigrator(keeper Keeper) Migrator {

// MigrateTraces migrates the DenomTraces to the correct format, accounting for slashes in the BaseDenom.
func (m Migrator) MigrateTraces(ctx sdk.Context) error {

// list of traces that must replace the old traces in store
var newTraces []types.DenomTrace
m.keeper.IterateDenomTraces(ctx,
Expand Down
2 changes: 0 additions & 2 deletions modules/apps/transfer/keeper/migrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ import (
)

func (suite *KeeperTestSuite) TestMigratorMigrateTraces() {

testCases := []struct {
msg string
malleate func()
expectedTraces transfertypes.Traces
}{

{
"success: two slashes in base denom",
func() {
Expand Down
1 change: 0 additions & 1 deletion modules/core/02-client/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ func (q Keeper) ConsensusStateHeights(c context.Context, req *types.QueryConsens
consensusStateHeights = append(consensusStateHeights, height)
return true, nil
})

if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion modules/core/03-connection/keeper/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ func (k Keeper) ConnOpenTry(
proofHeight exported.Height, // height at which relayer constructs proof of A storing connectionEnd in state
consensusHeight exported.Height, // latest height of chain B which chain A has stored in its chain B client
) (string, error) {

// generate a new connection
connectionID := k.GenerateConnectionIdentifier(ctx)

Expand Down

0 comments on commit 48c456d

Please sign in to comment.