Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pinosu committed Nov 14, 2024
1 parent b60fce4 commit 47d0b3a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func NewWasmApp(
// baseAppOptions = append(baseAppOptions, prepareOpt)

// create and set dummy vote extension handler
//voteExtOp := func(bApp *baseapp.BaseApp) {
// voteExtOp := func(bApp *baseapp.BaseApp) {
// voteExtHandler := NewVoteExtensionHandler()
// voteExtHandler.SetHandlers(bApp)
//}
Expand Down
4 changes: 3 additions & 1 deletion cmd/wasmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ func initTestnetFiles(
return err
}

srvconfig.SetConfigTemplate(srvconfig.DefaultConfigTemplate)
if err := srvconfig.SetConfigTemplate(srvconfig.DefaultConfigTemplate); err != nil {
return err
}
srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config", "app.toml"), appConfig)
}

Expand Down
5 changes: 3 additions & 2 deletions tests/e2e/ibc_fees_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"
"time"

wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types"
ibcfee "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types"
ibctransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" //nolint:staticcheck
Expand Down Expand Up @@ -246,12 +247,12 @@ func TestIBCFeesReflect(t *testing.T) {
path := wasmibctesting.NewPath(chainA, chainB)
path.EndpointA.ChannelConfig = &ibctesting.ChannelConfig{
PortID: ibctransfertypes.PortID,
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.Version})),
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
Order: channeltypes.UNORDERED,
}
path.EndpointB.ChannelConfig = &ibctesting.ChannelConfig{
PortID: ibctransfertypes.PortID,
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.Version})),
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
Order: channeltypes.UNORDERED,
}
// with an ics-29 fee enabled channel setup between both chains
Expand Down
2 changes: 1 addition & 1 deletion tests/ibctesting/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ func CommitHeader(proposedHeader cmttypes.Header, valSet *cmttypes.ValidatorSet,
// Thus we iterate over the ordered validator set and construct a signer array
// from the signer map in the same order.
signerArr := make([]cmttypes.PrivValidator, len(valSet.Validators))
for i, v := range valSet.Validators { //nolint:staticcheck // need to check for nil validator set
for i, v := range valSet.Validators {
signerArr[i] = signers[v.Address.String()]
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ibctesting/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ func (endpoint *Endpoint) ChanUpgradeInit() error {
endpoint.Chain.SenderAccount.GetAddress().String(),
endpoint.ChannelID,
"upgrade-init",
fmt.Sprintf("gov proposal for initialising channel upgrade: %s", endpoint.ChannelID),
fmt.Sprintf("gov proposal for initializing channel upgrade: %s", endpoint.ChannelID),
govtypesv1.ProposalType_PROPOSAL_TYPE_EXPEDITED,
)
require.NoError(endpoint.Chain.TB, err)
Expand Down
4 changes: 3 additions & 1 deletion x/wasm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ func (k Keeper) instantiate(
ctx, discount := k.checkDiscountEligibility(sdkCtx, codeInfo.CodeHash, k.IsPinnedCode(ctx, codeID))
setupCost := k.gasRegister.SetupContractCost(discount, len(initMsg))

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

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

0 comments on commit 47d0b3a

Please sign in to comment.