Skip to content

Commit bc3d718

Browse files
committed
Fix lint
1 parent b60fce4 commit bc3d718

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

app/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func NewWasmApp(
322322
// baseAppOptions = append(baseAppOptions, prepareOpt)
323323

324324
// create and set dummy vote extension handler
325-
//voteExtOp := func(bApp *baseapp.BaseApp) {
325+
// voteExtOp := func(bApp *baseapp.BaseApp) {
326326
// voteExtHandler := NewVoteExtensionHandler()
327327
// voteExtHandler.SetHandlers(bApp)
328328
//}

cmd/wasmd/testnet.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ func initTestnetFiles(
376376
return err
377377
}
378378

379-
srvconfig.SetConfigTemplate(srvconfig.DefaultConfigTemplate)
379+
if err := srvconfig.SetConfigTemplate(srvconfig.DefaultConfigTemplate); err != nil {
380+
return err
381+
}
380382
srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config", "app.toml"), appConfig)
381383
}
382384

tests/e2e/ibc_fees_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"testing"
88
"time"
99

10+
wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types"
1011
ibcfee "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types"
1112
ibctransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types"
1213
clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" //nolint:staticcheck
@@ -246,12 +247,12 @@ func TestIBCFeesReflect(t *testing.T) {
246247
path := wasmibctesting.NewPath(chainA, chainB)
247248
path.EndpointA.ChannelConfig = &ibctesting.ChannelConfig{
248249
PortID: ibctransfertypes.PortID,
249-
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.Version})),
250+
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
250251
Order: channeltypes.UNORDERED,
251252
}
252253
path.EndpointB.ChannelConfig = &ibctesting.ChannelConfig{
253254
PortID: ibctransfertypes.PortID,
254-
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.Version})),
255+
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
255256
Order: channeltypes.UNORDERED,
256257
}
257258
// with an ics-29 fee enabled channel setup between both chains
@@ -331,7 +332,7 @@ func TestIBCFeesReflect(t *testing.T) {
331332
// and on chain B
332333
pendingIncentivisedPackages = appA.IBCFeeKeeper.GetIdentifiedPacketFeesForChannel(chainA.GetContext(), ibctransfertypes.PortID, path.EndpointA.ChannelID)
333334
assert.Len(t, pendingIncentivisedPackages, 0)
334-
expBalance := ibctransfertypes.GetTransferCoin(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, sdk.DefaultBondDenom, sdkmath.NewInt(10))
335+
expBalance := GetTransferCoin(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, sdk.DefaultBondDenom, sdkmath.NewInt(10))
335336
gotBalance := chainB.Balance(actorChainB, expBalance.Denom)
336337
assert.Equal(t, expBalance.String(), gotBalance.String(), chainB.AllBalances(actorChainB))
337338
}

tests/ibctesting/chain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ func CommitHeader(proposedHeader cmttypes.Header, valSet *cmttypes.ValidatorSet,
527527
// Thus we iterate over the ordered validator set and construct a signer array
528528
// from the signer map in the same order.
529529
signerArr := make([]cmttypes.PrivValidator, len(valSet.Validators))
530-
for i, v := range valSet.Validators { //nolint:staticcheck // need to check for nil validator set
530+
for i, v := range valSet.Validators {
531531
signerArr[i] = signers[v.Address.String()]
532532
}
533533

tests/ibctesting/endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ func (endpoint *Endpoint) ChanUpgradeInit() error {
618618
endpoint.Chain.SenderAccount.GetAddress().String(),
619619
endpoint.ChannelID,
620620
"upgrade-init",
621-
fmt.Sprintf("gov proposal for initialising channel upgrade: %s", endpoint.ChannelID),
621+
fmt.Sprintf("gov proposal for initializing channel upgrade: %s", endpoint.ChannelID),
622622
govtypesv1.ProposalType_PROPOSAL_TYPE_EXPEDITED,
623623
)
624624
require.NoError(endpoint.Chain.TB, err)

x/wasm/keeper/keeper.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ func (k Keeper) instantiate(
270270
ctx, discount := k.checkDiscountEligibility(sdkCtx, codeInfo.CodeHash, k.IsPinnedCode(ctx, codeID))
271271
setupCost := k.gasRegister.SetupContractCost(discount, len(initMsg))
272272

273-
k.GasService.GasMeter(ctx).Consume(setupCost, "Loading CosmWasm module: instantiate")
273+
if err := k.GasService.GasMeter(ctx).Consume(setupCost, "Loading CosmWasm module: instantiate"); err != nil {
274+
return nil, nil, err
275+
}
274276

275277
if !authPolicy.CanInstantiateContract(codeInfo.InstantiateConfig, creator) {
276278
return nil, nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "can not instantiate")

0 commit comments

Comments
 (0)