Skip to content

Commit

Permalink
add godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Oct 18, 2024
1 parent 35ac391 commit fa02291
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions x/ccv/provider/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,23 +632,6 @@ func (k Keeper) QueryConsumerGenesisTime(goCtx context.Context, req *types.Query
}
ctx := sdk.UnwrapSDKContext(goCtx)

// phase := k.GetConsumerPhase(ctx, consumerId)
// if phase == types.CONSUMER_PHASE_UNSPECIFIED {
// return nil, status.Errorf(
// codes.InvalidArgument,
// "cannot get consumer genesis time for consumer Id: %s: %s",
// consumerId, types.ErrUnknownConsumerId,
// )
// }

// if phase != types.CONSUMER_PHASE_LAUNCHED {
// return nil, status.Errorf(
// codes.InvalidArgument,
// "cannot get consumer genesis time for consumer Id: %s: consumer hasn't been launched yet",
// consumerId,
// )
// }

// Get consumer initialization params. If they aren't found,
// it means that there is no consumer for that consumerId.
params, err := k.GetConsumerInitializationParameters(ctx, consumerId)
Expand All @@ -671,6 +654,8 @@ func (k Keeper) QueryConsumerGenesisTime(goCtx context.Context, req *types.Query
)
}

// Get the consensus state of the consumer client at the initial height,
// for which the timestamps corresponds to the consumer genesis time
cs, ok := k.clientKeeper.GetClientConsensusState(
ctx,
clientID,
Expand Down

0 comments on commit fa02291

Please sign in to comment.