From d55c2488a45f3a9c36de62985d8612ffcec77e1a Mon Sep 17 00:00:00 2001 From: insumity Date: Tue, 10 Sep 2024 16:07:33 +0200 Subject: [PATCH] took into account comments --- x/ccv/provider/keeper/msg_server.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/x/ccv/provider/keeper/msg_server.go b/x/ccv/provider/keeper/msg_server.go index ddce3d117e..a1f057b3ee 100644 --- a/x/ccv/provider/keeper/msg_server.go +++ b/x/ccv/provider/keeper/msg_server.go @@ -522,11 +522,10 @@ func (k msgServer) UpdateConsumer(goCtx context.Context, msg *types.MsgUpdateCon } k.SetConsumerPhase(ctx, consumerId, types.CONSUMER_PHASE_REGISTERED) } - } else { - // add SpawnTime event attribute - eventAttributes = append(eventAttributes, - sdk.NewAttribute(types.AttributeConsumerSpawnTime, msg.InitializationParameters.SpawnTime.String())) } + // add SpawnTime event attribute + eventAttributes = append(eventAttributes, + sdk.NewAttribute(types.AttributeConsumerSpawnTime, msg.InitializationParameters.SpawnTime.String())) if err = k.Keeper.SetConsumerInitializationParameters(ctx, msg.ConsumerId, *msg.InitializationParameters); err != nil { return &resp, errorsmod.Wrapf(types.ErrInvalidConsumerInitializationParameters, @@ -587,10 +586,6 @@ func (k msgServer) UpdateConsumer(goCtx context.Context, msg *types.MsgUpdateCon return &resp, errorsmod.Wrapf(ccvtypes.ErrInvalidConsumerState, "cannot prepare chain with consumer id (%s) for launch", consumerId) } - - // add SpawnTime event attribute - eventAttributes = append(eventAttributes, - sdk.NewAttribute(types.AttributeConsumerSpawnTime, msg.InitializationParameters.SpawnTime.String())) } // add Owner event attribute