Skip to content

Commit

Permalink
fix(lint): golang-client lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kobakaku committed Sep 30, 2024
1 parent 66e5511 commit deda999
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion app/test/priority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func (s *PriorityTestSuite) TestPriorityByGasPrice() {
wg := &sync.WaitGroup{}
for _, accName := range s.accountNames {
wg.Add(1)
accName := accName // new variable per iteration
go func() {
defer wg.Done()
// ensure that it is greater than the min gas price
Expand Down
3 changes: 0 additions & 3 deletions pkg/da/data_availability_header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func TestExtendShares(t *testing.T) {
}

for _, tt := range tests {
tt := tt
_, err := ExtendShares(tt.shares)
if tt.expectedErr {
require.NotNil(t, err)
Expand Down Expand Up @@ -122,7 +121,6 @@ func TestDataAvailabilityHeaderProtoConversion(t *testing.T) {
}

for _, tt := range tests {
tt := tt
pdah, err := tt.dah.ToProto()
require.NoError(t, err)
resDah, err := DataAvailabilityHeaderFromProto(pdah)
Expand Down Expand Up @@ -203,7 +201,6 @@ func Test_DAHValidateBasic(t *testing.T) {
}

for _, tt := range tests {
tt := tt
err := tt.dah.ValidateBasic()
if tt.expectErr {
require.True(t, strings.Contains(err.Error(), tt.errStr), tt.name)
Expand Down
1 change: 0 additions & 1 deletion x/blob/client/testutil/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ func (s *IntegrationTestSuite) TestSubmitPayForBlob() {
}

for _, tc := range testCases {
tc := tc
require.NoError(s.ctx.WaitForNextBlock())
s.Run(tc.name, func() {
cmd := paycli.CmdPayForBlob()
Expand Down
4 changes: 2 additions & 2 deletions x/blobstream/keeper/keeper_data_commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (k Keeper) GetLatestDataCommitment(ctx sdk.Context) (types.DataCommitment,
return types.DataCommitment{}, err
}
if !found {
return types.DataCommitment{}, errors.Wrapf(types.ErrAttestationNotFound, fmt.Sprintf("nonce %d", i))
return types.DataCommitment{}, errors.Wrapf(types.ErrAttestationNotFound, "nonce %d", i)
}
dcc, ok := att.(*types.DataCommitment)
if !ok {
Expand All @@ -136,7 +136,7 @@ func (k Keeper) HasDataCommitmentInStore(ctx sdk.Context) (bool, error) {
return false, err
}
if !found {
return false, errors.Wrapf(types.ErrAttestationNotFound, fmt.Sprintf("nonce %d", i))
return false, errors.Wrapf(types.ErrAttestationNotFound, "nonce %d", i)
}
_, ok := att.(*types.DataCommitment)
if !ok {
Expand Down
1 change: 0 additions & 1 deletion x/blobstream/keeper/keeper_valset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func TestCurrentValsetNormalization(t *testing.T) {
},
}
for msg, spec := range specs {
spec := spec
t.Run(msg, func(t *testing.T) {
input, ctx := testutil.SetupTestChain(t, spec.srcPowers)
r, err := input.BlobstreamKeeper.GetCurrentValset(ctx)
Expand Down
6 changes: 0 additions & 6 deletions x/mint/client/testutil/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ func (s *IntegrationTestSuite) TestGetCmdQueryInflationRate() {
}

for _, tc := range testCases {
tc := tc

s.Run(tc.name, func() {
cmd := cli.GetCmdQueryInflationRate()

Expand Down Expand Up @@ -103,8 +101,6 @@ func (s *IntegrationTestSuite) TestGetCmdQueryAnnualProvisions() {

expectedAnnualProvision := mint.InitialInflationRateAsDec().MulInt(sdk.NewInt(testnode.DefaultInitialBalance))
for _, tc := range testCases {
tc := tc

s.Run(tc.name, func() {
cmd := cli.GetCmdQueryAnnualProvisions()
out, err := clitestutil.ExecTestCLICmd(s.cctx.Context, cmd, tc.args)
Expand Down Expand Up @@ -134,8 +130,6 @@ func (s *IntegrationTestSuite) TestGetCmdQueryGenesisTime() {
}

for _, tc := range testCases {
tc := tc

s.Run(tc.name, func() {
cmd := cli.GetCmdQueryGenesisTime()
out, err := clitestutil.ExecTestCLICmd(s.cctx.Context, cmd, tc.args)
Expand Down
1 change: 0 additions & 1 deletion x/mint/simulation/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func TestDecodeStore(t *testing.T) {
}

for i, tt := range tests {
i, tt := i, tt
t.Run(tt.name, func(t *testing.T) {
if tt.expectPanic {
require.Panics(t, func() { decoder(kvPairs.Pairs[i], kvPairs.Pairs[i]) }, tt.name)
Expand Down

0 comments on commit deda999

Please sign in to comment.