diff --git a/go.mod b/go.mod index 11aba3adf..d74e82bc0 100644 --- a/go.mod +++ b/go.mod @@ -176,7 +176,7 @@ replace ( github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-cometbft v1.3.0 github.com/cometbft/cometbft-db => github.com/bnb-chain/greenfield-cometbft-db v0.8.1-alpha.1 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v1.7.0 + github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v1.7.3-0.20240527082454-48d116d99ca4 github.com/cosmos/iavl => github.com/bnb-chain/greenfield-iavl v0.20.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/wercker/journalhook => github.com/wercker/journalhook v0.0.0-20230927020745-64542ffa4117 diff --git a/go.sum b/go.sum index 3ed9e536f..4575b3f99 100644 --- a/go.sum +++ b/go.sum @@ -163,8 +163,8 @@ github.com/bnb-chain/greenfield-cometbft v1.3.0 h1:v3nZ16ledTZGF5Csys7fTQGZcEV78 github.com/bnb-chain/greenfield-cometbft v1.3.0/go.mod h1:0D+VPivZTeBldjtGGi9LKbBnKEO/RtMRJikie92LkYI= github.com/bnb-chain/greenfield-cometbft-db v0.8.1-alpha.1 h1:XcWulGacHVRiSCx90Q8Y//ajOrLNBQWR/KDB89dy3cU= github.com/bnb-chain/greenfield-cometbft-db v0.8.1-alpha.1/go.mod h1:ey1CiK4bYo1RBNJLRiVbYr5CMdSxci9S/AZRINLtppI= -github.com/bnb-chain/greenfield-cosmos-sdk v1.7.0 h1:4wr+w9BMTU/S2LZd4J/Gc5v4H9Z1JTpJxno09g1nekY= -github.com/bnb-chain/greenfield-cosmos-sdk v1.7.0/go.mod h1:2bwmwdXYBISnQoMwgAcZTVGt21lMsHZSeeeMByTvDlQ= +github.com/bnb-chain/greenfield-cosmos-sdk v1.7.3-0.20240527082454-48d116d99ca4 h1:0UFOOdVKbiIEfKkL15NJ/VtE6TSdlwM4HtJJuukJfio= +github.com/bnb-chain/greenfield-cosmos-sdk v1.7.3-0.20240527082454-48d116d99ca4/go.mod h1:2bwmwdXYBISnQoMwgAcZTVGt21lMsHZSeeeMByTvDlQ= github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230816082903-b48770f5e210 h1:GHPbV2bC+gmuO6/sG0Tm8oGal3KKSRlyE+zPscDjlA8= github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230816082903-b48770f5e210/go.mod h1:vhsZxXE9tYJeYB5JR4hPhd6Pc/uPf7j1T8IJ7p9FdeM= github.com/bnb-chain/greenfield-cosmos-sdk/math v0.0.0-20230816082903-b48770f5e210 h1:FLVOn4+OVbsKi2+YJX5kmD27/4dRu4FW7xCXFhzDO5s= diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 0eec8463a..0ed08f60a 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -2129,8 +2129,10 @@ func (k Keeper) MigrateBucket(ctx sdk.Context, operator sdk.AccAddress, bucketNa return types.ErrInvalidBucketStatus.Wrapf("The bucket already been migrating") } - if bucketInfo.BucketStatus == types.BUCKET_STATUS_DISCONTINUED { - return types.ErrInvalidBucketStatus.Wrapf("The discontinued bucket cannot be migrated") + if ctx.IsUpgraded(upgradetypes.Veld) { + if bucketInfo.BucketStatus == types.BUCKET_STATUS_DISCONTINUED { + return types.ErrInvalidBucketStatus.Wrapf("The discontinued bucket cannot be migrated") + } } srcSP := k.MustGetPrimarySPForBucket(ctx, bucketInfo)