From 5e10e83db62304ff891f467ce84c6ca89884b87f Mon Sep 17 00:00:00 2001 From: quasisamurai Date: Tue, 24 Sep 2024 09:32:14 -0300 Subject: [PATCH] aftermerge clean --- app/app.go | 1 - app/upgrades/v5.0.0/constants.go | 2 +- app/upgrades/v5.0.0/upgrades.go | 1 - app/upgrades/v5.0.0/upgrades_test.go | 65 ---------------------------- 4 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 app/upgrades/v5.0.0/upgrades_test.go diff --git a/app/app.go b/app/app.go index e2ddf2123..464d5a62c 100644 --- a/app/app.go +++ b/app/app.go @@ -37,7 +37,6 @@ import ( servicemetrics "github.com/skip-mev/slinky/service/metrics" v500 "github.com/neutron-org/neutron/v5/app/upgrades/v5.0.0" - v500 "github.com/neutron-org/neutron/v4/app/upgrades/v5.0.0" "github.com/neutron-org/neutron/v5/x/globalfee" globalfeetypes "github.com/neutron-org/neutron/v5/x/globalfee/types" diff --git a/app/upgrades/v5.0.0/constants.go b/app/upgrades/v5.0.0/constants.go index 436b2baf7..dcc1aff40 100644 --- a/app/upgrades/v5.0.0/constants.go +++ b/app/upgrades/v5.0.0/constants.go @@ -7,7 +7,7 @@ import ( const ( // UpgradeName defines the on-chain upgrade name. - UpgradeName = "v4.0.1" + UpgradeName = "v5.0.0" ) var Upgrade = upgrades.Upgrade{ diff --git a/app/upgrades/v5.0.0/upgrades.go b/app/upgrades/v5.0.0/upgrades.go index d3c0d85ce..143db2b7b 100644 --- a/app/upgrades/v5.0.0/upgrades.go +++ b/app/upgrades/v5.0.0/upgrades.go @@ -4,7 +4,6 @@ import ( "context" "fmt" - "cosmossdk.io/errors" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/app/upgrades/v5.0.0/upgrades_test.go b/app/upgrades/v5.0.0/upgrades_test.go deleted file mode 100644 index 0a5d07207..000000000 --- a/app/upgrades/v5.0.0/upgrades_test.go +++ /dev/null @@ -1,65 +0,0 @@ -package v400_test - -import ( - "testing" - - "cosmossdk.io/math" - upgradetypes "cosmossdk.io/x/upgrade/types" - "github.com/stretchr/testify/suite" - - v500 "github.com/neutron-org/neutron/v4/app/upgrades/v5.0.0" - "github.com/neutron-org/neutron/v4/testutil/common/sample" - - "github.com/neutron-org/neutron/v4/testutil" - dexkeeper "github.com/neutron-org/neutron/v4/x/dex/keeper" - dextypes "github.com/neutron-org/neutron/v4/x/dex/types" -) - -type UpgradeTestSuite struct { - testutil.IBCConnectionTestSuite -} - -func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(UpgradeTestSuite)) -} - -func (suite *UpgradeTestSuite) SetupTest() { - suite.IBCConnectionTestSuite.SetupTest() -} - -func (suite *UpgradeTestSuite) TestUpgradeDexPause() { - var ( - app = suite.GetNeutronZoneApp(suite.ChainA) - ctx = suite.ChainA.GetContext().WithChainID("neutron-1") - msgServer = dexkeeper.NewMsgServerImpl(app.DexKeeper) - ) - - params := app.DexKeeper.GetParams(ctx) - - suite.False(params.Paused) - - upgrade := upgradetypes.Plan{ - Name: v500.UpgradeName, - Info: "some text here", - Height: 100, - } - suite.NoError(app.UpgradeKeeper.ApplyUpgrade(ctx, upgrade)) - - params = app.DexKeeper.GetParams(ctx) - - suite.True(params.Paused) - - _, err := msgServer.Deposit(ctx, &dextypes.MsgDeposit{ - Creator: sample.AccAddress(), - Receiver: sample.AccAddress(), - TokenA: "TokenA", - TokenB: "TokenB", - TickIndexesAToB: []int64{1}, - Fees: []uint64{1}, - AmountsA: []math.Int{math.OneInt()}, - AmountsB: []math.Int{math.ZeroInt()}, - Options: []*dextypes.DepositOptions{{}}, - }) - - suite.ErrorIs(err, dextypes.ErrDexPaused) -}