laconicd-deprecated/x/evm/keeper/migrations_test.go
mmsqe 5f7ee9bfad
fix: avoid duplicate register proto type in evm & feemarket (#1586)
* 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>
2023-01-12 10:52:55 +02:00

42 lines
890 B
Go

package keeper_test
import (
sdk "github.com/cosmos/cosmos-sdk/types"
evmkeeper "github.com/evmos/ethermint/x/evm/keeper"
"github.com/evmos/ethermint/x/evm/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 := evmkeeper.NewMigrator(*suite.app.EvmKeeper, 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)
})
}
}