From b2ef76bd611313ae68a4f591865f4ebe823549c5 Mon Sep 17 00:00:00 2001 From: Alexxxxxx <118710506+alexgao001@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:33:25 +0800 Subject: [PATCH] delete after harkfork (#592) --- x/storage/keeper/keeper.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 0f896175d..542db4474 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -235,8 +235,9 @@ func (k Keeper) doDeleteBucket(ctx sdk.Context, operator sdk.AccAddress, bucketI store.Delete(types.GetQuotaKey(bucketInfo.Id)) store.Delete(types.GetInternalBucketInfoKey(bucketInfo.Id)) store.Delete(types.GetMigrationBucketKey(bucketInfo.Id)) - store.Delete(types.GetLockedObjectCountKey(bucketInfo.Id)) - + if ctx.IsUpgraded(upgradetypes.Pawnee) { + store.Delete(types.GetLockedObjectCountKey(bucketInfo.Id)) + } err := k.appendResourceIdForGarbageCollection(ctx, resource.RESOURCE_TYPE_BUCKET, bucketInfo.Id) if err != nil { return err