Skip to content

Commit

Permalink
Problem: golangci-lint fail at v1.54.2 on github action (crypto-org-c…
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe authored Aug 25, 2023
1 parent cc7f377 commit 54fea4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions x/cronos/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (suite *KeeperTestSuite) DoSetupTest(t *testing.T) {
consAddress := sdk.ConsAddress(priv.PubKey().Address())

suite.app = app.Setup(t, sdk.AccAddress(suite.address.Bytes()).String(), false)
blockIDHash := tmhash.Sum([]byte("block_id"))
hash := tmhash.Sum([]byte("partset_header"))
suite.ctx = suite.app.NewContext(false, tmproto.Header{
Height: 1,
ChainID: app.TestAppChainID,
Expand All @@ -72,10 +74,10 @@ func (suite *KeeperTestSuite) DoSetupTest(t *testing.T) {
Block: version.BlockProtocol,
},
LastBlockId: tmproto.BlockID{
Hash: tmhash.Sum([]byte("block_id")),
Hash: blockIDHash,
PartSetHeader: tmproto.PartSetHeader{
Total: 11,
Hash: tmhash.Sum([]byte("partset_header")),
Hash: hash,
},
},
AppHash: tmhash.Sum([]byte("app")),
Expand Down Expand Up @@ -396,6 +398,7 @@ func (suite *KeeperTestSuite) TestRegisterOrUpdateTokenMapping() {
}

for _, tc := range testCases {
tc := tc
suite.Run(tc.name, func() {
suite.SetupTest() // reset
// Create Cronos Keeper with mock transfer keeper
Expand Down
2 changes: 1 addition & 1 deletion x/cronos/keeper/mock/ibckeeper_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (i IbcKeeperMock) Transfer(goCtx context.Context, msg *types.MsgTransfer) (
}

func (i IbcKeeperMock) GetDenomTrace(ctx sdk.Context, denomTraceHash tmbytes.HexBytes) (types.DenomTrace, bool) {
if denomTraceHash.String() == "6B5A664BF0AF4F71B2F0BAA33141E2F1321242FBD5D19762F541EC971ACB0865" {
if denomTraceHash.String() == "6B5A664BF0AF4F71B2F0BAA33141E2F1321242FBD5D19762F541EC971ACB0865" { //nolint:gosec // test only
return types.DenomTrace{
Path: "transfer/channel-0",
BaseDenom: "basetcro",
Expand Down

0 comments on commit 54fea4d

Please sign in to comment.