Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze committed Mar 30, 2022
1 parent 9abba95 commit d86b789
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
3 changes: 0 additions & 3 deletions client/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ func initTestnetFiles(
genBalIterator banktypes.GenesisBalancesIterator,
args initArgs,
) error {

if args.chainID == "" {
args.chainID = fmt.Sprintf("ethermint_%d-1", tmrand.Int63n(9999999999999)+1)
}
Expand Down Expand Up @@ -377,7 +376,6 @@ func initGenFiles(
genFiles []string,
numValidators int,
) error {

appGenState := mbm.DefaultGenesis(clientCtx.Codec)
// set the accounts in the genesis state
var authGenState authtypes.GenesisState
Expand Down Expand Up @@ -453,7 +451,6 @@ func collectGenFiles(
nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int,
outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator,
) error {

var appState json.RawMessage
genTime := tmtime.Now()

Expand Down
3 changes: 2 additions & 1 deletion rpc/ethereum/backend/feebackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func (e *EVMBackend) processBlock(
ethBlock *map[string]interface{},
rewardPercentiles []float64,
tendermintBlockResult *tmrpctypes.ResultBlockResults,
targetOneFeeHistory *rpctypes.OneFeeHistory) error {
targetOneFeeHistory *rpctypes.OneFeeHistory,
) error {
blockHeight := tendermintBlock.Block.Height
blockBaseFee, err := e.BaseFee(blockHeight)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion tests/importer/chain_ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func (cc *ChainContext) Finalize(
// consensus rules that happen at finalization (e.g. block rewards).
// TODO: Figure out if this needs to be hooked up to any part of the ABCI?
func (cc *ChainContext) FinalizeAndAssemble(_ ethcons.ChainHeaderReader, _ *ethtypes.Header, _ *ethstate.StateDB, _ []*ethtypes.Transaction,
_ []*ethtypes.Header, _ []*ethtypes.Receipt) (*ethtypes.Block, error) {
_ []*ethtypes.Header, _ []*ethtypes.Receipt,
) (*ethtypes.Block, error) {
return nil, nil
}

Expand Down
4 changes: 2 additions & 2 deletions x/feemarket/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"

v0_10 "github.com/tharsis/ethermint/x/feemarket/migrations/v0_10"
v010 "github.com/tharsis/ethermint/x/feemarket/migrations/v010"
)

// Migrator is a struct for handling in-place store migrations.
Expand All @@ -20,5 +20,5 @@ func NewMigrator(keeper Keeper) Migrator {

// Migrate1to2 migrates the store from consensus version v1 to v2
func (m Migrator) Migrate1to2(ctx sdk.Context) error {
return v0_10.MigrateStore(ctx, &m.keeper.paramSpace, m.keeper.storeKey)
return v010.MigrateStore(ctx, &m.keeper.paramSpace, m.keeper.storeKey)
}
4 changes: 2 additions & 2 deletions x/feemarket/keeper/migrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"math/big"

"github.com/tharsis/ethermint/x/feemarket/keeper"
"github.com/tharsis/ethermint/x/feemarket/migrations/v0_10"
v010 "github.com/tharsis/ethermint/x/feemarket/migrations/v010"
)

func (suite *KeeperTestSuite) TestMigration1To2() {
suite.SetupTest()
storeKey := suite.app.GetKey("feemarket")
store := suite.ctx.KVStore(storeKey)
baseFee := big.NewInt(1000)
store.Set(v0_10.KeyPrefixBaseFeeV1, baseFee.Bytes())
store.Set(v010.KeyPrefixBaseFeeV1, baseFee.Bytes())
m := keeper.NewMigrator(suite.app.FeeMarketKeeper)
err := m.Migrate1to2(suite.ctx)
suite.Require().NoError(err)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package v0_10
package v010

import (
"math/big"

sdk "github.com/cosmos/cosmos-sdk/types"

paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
v09types "github.com/tharsis/ethermint/x/feemarket/migrations/v0_9/types"
v09types "github.com/tharsis/ethermint/x/feemarket/migrations/v09/types"
"github.com/tharsis/ethermint/x/feemarket/types"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v0_10_test
package v010_test

import (
"fmt"
Expand All @@ -14,7 +14,7 @@ import (

"github.com/tharsis/ethermint/app"
feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper"
v0_10 "github.com/tharsis/ethermint/x/feemarket/migrations/v0_10"
v010 "github.com/tharsis/ethermint/x/feemarket/migrations/v010"
"github.com/tharsis/ethermint/x/feemarket/types"
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types"
)
Expand All @@ -32,7 +32,7 @@ func TestMigrateStore(t *testing.T) {
require.True(t, paramstore.HasKeyTable())

// check that the fee market is not nil
err := v0_10.MigrateStore(ctx, &paramstore, feemarketKey)
err := v010.MigrateStore(ctx, &paramstore, feemarketKey)
require.NoError(t, err)
require.False(t, ctx.KVStore(feemarketKey).Has(v0_10.KeyPrefixBaseFeeV1))

Expand Down

0 comments on commit d86b789

Please sign in to comment.