From 599509565e33c61a5944f803d70fa2121ae5ff72 Mon Sep 17 00:00:00 2001 From: lukema95 Date: Fri, 10 Oct 2025 16:34:59 +0800 Subject: [PATCH] prevent clearing all active topics when removing non-existent topic --- x/emissions/keeper/topic_activation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/emissions/keeper/topic_activation.go b/x/emissions/keeper/topic_activation.go index c1e12dd28..381a7961d 100644 --- a/x/emissions/keeper/topic_activation.go +++ b/x/emissions/keeper/topic_activation.go @@ -133,7 +133,7 @@ func (k *Keeper) inactivateTopicWithoutMinWeightReset(ctx context.Context, topic } // Remove the topic from the active topics at the block // If the topic is not found in the active topics at the block, no op - newActiveTopicIds := []TopicId{} + newActiveTopicIds := topicIdsActiveAtBlock.TopicIds for i, id := range topicIdsActiveAtBlock.TopicIds { if id == topicId { newActiveTopicIds = append(topicIdsActiveAtBlock.TopicIds[:i], topicIdsActiveAtBlock.TopicIds[i+1:]...)