5f7ee9bfad
* update dep * make proto-all * avoid duplicate register proto type in evm * set KeyTable * update from version to v.19.x which support submit-proposal * test AvailableExtraEIPs * keep grpc query compatible with version before migrate * fix duplicate register & migrate in feemarket * update nix * support typed event for bloom & txLog * partial revert typed ethereumTx * Revert "partial revert typed ethereumTx" This reverts commit 314bb288f385b79f6fff6badff79cd790b74a27e. * Revert "support typed event for bloom & txLog" This reverts commit 287d3aec30a951a7cece40a0c310858997850a3d. Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
42 lines
919 B
Go
42 lines
919 B
Go
package keeper_test
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper"
|
|
"github.com/evmos/ethermint/x/feemarket/types"
|
|
)
|
|
|
|
type mockSubspace struct {
|
|
ps types.Params
|
|
}
|
|
|
|
func newMockSubspace(ps types.Params) mockSubspace {
|
|
return mockSubspace{ps: ps}
|
|
}
|
|
|
|
func (ms mockSubspace) GetParamSetIfExists(_ sdk.Context, ps types.LegacyParams) {
|
|
*ps.(*types.Params) = ms.ps
|
|
}
|
|
|
|
func (suite *KeeperTestSuite) TestMigrations() {
|
|
legacySubspace := newMockSubspace(types.DefaultParams())
|
|
migrator := feemarketkeeper.NewMigrator(suite.app.FeeMarketKeeper, legacySubspace)
|
|
|
|
testCases := []struct {
|
|
name string
|
|
migrateFunc func(ctx sdk.Context) error
|
|
}{
|
|
{
|
|
"Run Migrate3to4",
|
|
migrator.Migrate3to4,
|
|
},
|
|
}
|
|
|
|
for _, tc := range testCases {
|
|
suite.Run(tc.name, func() {
|
|
err := tc.migrateFunc(suite.ctx)
|
|
suite.Require().NoError(err)
|
|
})
|
|
}
|
|
}
|