Skip to content

Commit

Permalink
handle error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Aug 29, 2024
1 parent 7d09673 commit 54fd3e1
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 51 deletions.
2 changes: 1 addition & 1 deletion testutil/ibc_testing/generic_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func AddConsumer[Tp testutil.ProviderApp, Tc testutil.ConsumerApp](
providerKeeper.SetConsumerInitializationParameters(providerChain.GetContext(), consumerId, initializationParameters)
providerKeeper.SetConsumerPowerShapingParameters(providerChain.GetContext(), consumerId, powerShapingParameters)
providerKeeper.SetConsumerPhase(providerChain.GetContext(), consumerId, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED)
providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(providerChain.GetContext(), consumerId, coordinator.CurrentTime)
providerKeeper.AppendConsumerToBeLaunched(providerChain.GetContext(), consumerId, coordinator.CurrentTime)

// opt-in all validators
lastVals, err := providerApp.GetProviderKeeper().GetLastBondedValidators(providerChain.GetContext())
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/provider/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ func TestQueryConsumerChains(t *testing.T) {
name: "expect initialized consumers when phase is set to Initialized",
setup: func(ctx sdk.Context, pk keeper.Keeper) {
consumers[1].Phase = types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED
err := pk.AppendConsumerToBeLaunchedOnSpawnTime(ctx, consumerIds[1], time.Now())
err := pk.AppendConsumerToBeLaunched(ctx, consumerIds[1], time.Now())
require.NoError(t, err)
pk.SetConsumerPhase(ctx, consumerIds[1], types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED)
},
Expand Down
20 changes: 14 additions & 6 deletions x/ccv/provider/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,16 @@ func (k msgServer) AssignConsumerKey(goCtx context.Context, msg *types.MsgAssign
func (k msgServer) RemoveConsumer(goCtx context.Context, msg *types.MsgRemoveConsumer) (*types.MsgRemoveConsumerResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

resp := types.MsgRemoveConsumerResponse{}

consumerId := msg.ConsumerId
ownerAddress, err := k.Keeper.GetConsumerOwnerAddress(ctx, consumerId)
if err != nil {
return &types.MsgRemoveConsumerResponse{}, errorsmod.Wrapf(types.ErrNoOwnerAddress, "cannot retrieve owner address %s", ownerAddress)
return &resp, errorsmod.Wrapf(types.ErrNoOwnerAddress, "cannot retrieve owner address %s", ownerAddress)
}

if msg.Signer != ownerAddress {
return &types.MsgRemoveConsumerResponse{}, errorsmod.Wrapf(types.ErrUnauthorized, "expected owner address %s, got %s", ownerAddress, msg.Signer)
return &resp, errorsmod.Wrapf(types.ErrUnauthorized, "expected owner address %s, got %s", ownerAddress, msg.Signer)
}

phase := k.Keeper.GetConsumerPhase(ctx, consumerId)
Expand All @@ -109,13 +111,19 @@ func (k msgServer) RemoveConsumer(goCtx context.Context, msg *types.MsgRemoveCon

previousStopTime, err := k.Keeper.GetConsumerStopTime(ctx, consumerId)
if err == nil {
k.Keeper.RemoveConsumerToBeStoppedFromStopTime(ctx, consumerId, previousStopTime)
if err := k.Keeper.RemoveConsumerToBeStopped(ctx, consumerId, previousStopTime); err != nil {
return &resp, errorsmod.Wrapf(ccvtypes.ErrInvalidConsumerState, "cannot remove previous stop time: %s", err.Error())
}
}

k.Keeper.SetConsumerStopTime(ctx, consumerId, msg.StopTime)
k.Keeper.AppendConsumerToBeStoppedOnStopTime(ctx, consumerId, msg.StopTime)
if err := k.Keeper.SetConsumerStopTime(ctx, consumerId, msg.StopTime); err != nil {
return &resp, errorsmod.Wrapf(types.ErrInvalidStopTime, "cannot set stop time: %s", err.Error())
}
if err := k.Keeper.AppendConsumerToBeStopped(ctx, consumerId, msg.StopTime); err != nil {
return &resp, errorsmod.Wrapf(ccvtypes.ErrInvalidConsumerState, "cannot set consumer to be stop: %s", err.Error())
}

return &types.MsgRemoveConsumerResponse{}, nil
return &resp, nil
}

// ChangeRewardDenoms defines a rpc handler method for MsgChangeRewardDenoms
Expand Down
20 changes: 10 additions & 10 deletions x/ccv/provider/keeper/permissionless.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ func (k Keeper) GetConsumersToBeLaunched(ctx sdk.Context, spawnTime time.Time) (
return k.getConsumerIdsBasedOnTime(ctx, types.SpawnTimeToConsumerIdsKey, spawnTime)
}

// AppendConsumerToBeLaunchedOnSpawnTime appends the provider consumer id for the given spawn time
func (k Keeper) AppendConsumerToBeLaunchedOnSpawnTime(ctx sdk.Context, consumerId string, spawnTime time.Time) error {
// AppendConsumerToBeLaunched appends the provider consumer id for the given spawn time
func (k Keeper) AppendConsumerToBeLaunched(ctx sdk.Context, consumerId string, spawnTime time.Time) error {
return k.appendConsumerIdOnTime(ctx, consumerId, types.SpawnTimeToConsumerIdsKey, spawnTime)
}

// RemoveConsumerToBeLaunchedFromSpawnTime removes consumer id from if stored for this specific spawn time
func (k Keeper) RemoveConsumerToBeLaunchedFromSpawnTime(ctx sdk.Context, consumerId string, spawnTime time.Time) error {
// RemoveConsumerToBeLaunched removes consumer id from if stored for this specific spawn time
func (k Keeper) RemoveConsumerToBeLaunched(ctx sdk.Context, consumerId string, spawnTime time.Time) error {
return k.removeConsumerIdFromTime(ctx, consumerId, types.SpawnTimeToConsumerIdsKey, spawnTime)
}

Expand All @@ -344,13 +344,13 @@ func (k Keeper) GetConsumersToBeStopped(ctx sdk.Context, stopTime time.Time) (ty
return k.getConsumerIdsBasedOnTime(ctx, types.StopTimeToConsumerIdsKey, stopTime)
}

// AppendConsumerToBeStoppedOnStopTime appends the provider consumer id for the given stop time
func (k Keeper) AppendConsumerToBeStoppedOnStopTime(ctx sdk.Context, consumerId string, stopTime time.Time) error {
// AppendConsumerToBeStopped appends the provider consumer id for the given stop time
func (k Keeper) AppendConsumerToBeStopped(ctx sdk.Context, consumerId string, stopTime time.Time) error {
return k.appendConsumerIdOnTime(ctx, consumerId, types.StopTimeToConsumerIdsKey, stopTime)
}

// RemoveConsumerToBeStoppedFromStopTime removes consumer id from if stored for this specific stop time
func (k Keeper) RemoveConsumerToBeStoppedFromStopTime(ctx sdk.Context, consumerId string, stopTime time.Time) error {
// RemoveConsumerToBeStopped removes consumer id from if stored for this specific stop time
func (k Keeper) RemoveConsumerToBeStopped(ctx sdk.Context, consumerId string, stopTime time.Time) error {
return k.removeConsumerIdFromTime(ctx, consumerId, types.StopTimeToConsumerIdsKey, stopTime)
}

Expand Down Expand Up @@ -649,12 +649,12 @@ func (k Keeper) PrepareConsumerForLaunch(ctx sdk.Context, consumerId string, pre
if !previousSpawnTime.Equal(time.Time{}) {
// if this is not the first initialization and hence `previousSpawnTime` does not contain the zero value of `Time`
// remove the consumer id from the previous spawn time
err := k.RemoveConsumerToBeLaunchedFromSpawnTime(ctx, consumerId, previousSpawnTime)
err := k.RemoveConsumerToBeLaunched(ctx, consumerId, previousSpawnTime)
if err != nil {
return err
}
}
return k.AppendConsumerToBeLaunchedOnSpawnTime(ctx, consumerId, spawnTime)
return k.AppendConsumerToBeLaunched(ctx, consumerId, spawnTime)
}

// CanLaunch checks on whether the consumer with `consumerId` has set all the initialization parameters set and hence
Expand Down
52 changes: 26 additions & 26 deletions x/ccv/provider/keeper/permissionless_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,36 +263,36 @@ func TestConsumerStopTime(t *testing.T) {
require.Error(t, err)
}

// TestConsumersToBeLaunched tests `AppendConsumerToBeLaunchedOnSpawnTime`, `GetConsumersToBeLaunched`, and `RemoveConsumerToBeLaunchedFromSpawnTime`
// TestConsumersToBeLaunched tests `AppendConsumerToBeLaunched`, `GetConsumersToBeLaunched`, and `RemoveConsumerToBeLaunched`
func TestConsumersToBeLaunched(t *testing.T) {
providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t))
defer ctrl.Finish()

spawnTime := time.Now()
providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId1", spawnTime)
providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId1", spawnTime)
consumers, err := providerKeeper.GetConsumersToBeLaunched(ctx, spawnTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1"}, consumers.Ids)

providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId2", spawnTime)
providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId2", spawnTime)
consumers, err = providerKeeper.GetConsumersToBeLaunched(ctx, spawnTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1", "consumerId2"}, consumers.Ids)

providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId3", spawnTime)
providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId3", spawnTime)
consumers, err = providerKeeper.GetConsumersToBeLaunched(ctx, spawnTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1", "consumerId2", "consumerId3"}, consumers.Ids)

err = providerKeeper.RemoveConsumerToBeLaunchedFromSpawnTime(ctx, "consumerId2", spawnTime)
err = providerKeeper.RemoveConsumerToBeLaunched(ctx, "consumerId2", spawnTime)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeLaunched(ctx, spawnTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1", "consumerId3"}, consumers.Ids)

// also add consumer ids under a different spawn time and verify everything under the original spawn time is still there
spawnTimePlusOneHour := spawnTime.Add(time.Hour)
providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId4", spawnTimePlusOneHour)
providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId4", spawnTimePlusOneHour)
consumers, err = providerKeeper.GetConsumersToBeLaunched(ctx, spawnTimePlusOneHour)
require.NoError(t, err)
require.Equal(t, []string{"consumerId4"}, consumers.Ids)
Expand All @@ -302,59 +302,59 @@ func TestConsumersToBeLaunched(t *testing.T) {
require.Equal(t, []string{"consumerId1", "consumerId3"}, consumers.Ids)

// start removing all consumers from `spawnTime`
err = providerKeeper.RemoveConsumerToBeLaunchedFromSpawnTime(ctx, "consumerId3", spawnTime)
err = providerKeeper.RemoveConsumerToBeLaunched(ctx, "consumerId3", spawnTime)
require.NoError(t, err)
err = providerKeeper.RemoveConsumerToBeLaunchedFromSpawnTime(ctx, "consumerId1", spawnTime)
err = providerKeeper.RemoveConsumerToBeLaunched(ctx, "consumerId1", spawnTime)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeLaunched(ctx, spawnTime)
require.NoError(t, err)
require.Empty(t, consumers.Ids)

// remove from `spawnTimePlusOneHour`
err = providerKeeper.RemoveConsumerToBeLaunchedFromSpawnTime(ctx, "consumerId4", spawnTimePlusOneHour)
err = providerKeeper.RemoveConsumerToBeLaunched(ctx, "consumerId4", spawnTimePlusOneHour)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeLaunched(ctx, spawnTimePlusOneHour)
require.NoError(t, err)
require.Empty(t, consumers.Ids)

// add another consumer for `spawnTime`
err = providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId5", spawnTime)
err = providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId5", spawnTime)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeLaunched(ctx, spawnTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId5"}, consumers.Ids)
}

// TestConsumersToBeStopped tests `AppendConsumerToBeLaunchedOnSpawnTime`, `GetConsumersToBeLaunched`, and `RemoveConsumerToBeLaunchedFromSpawnTime`
// TestConsumersToBeStopped tests `AppendConsumerToBeLaunched`, `GetConsumersToBeLaunched`, and `RemoveConsumerToBeLaunched`
func TestConsumersToBeStopped(t *testing.T) {
providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t))
defer ctrl.Finish()

stopTime := time.Now()
providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId1", stopTime)
providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId1", stopTime)
consumers, err := providerKeeper.GetConsumersToBeStopped(ctx, stopTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1"}, consumers.Ids)

providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId2", stopTime)
providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId2", stopTime)
consumers, err = providerKeeper.GetConsumersToBeStopped(ctx, stopTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1", "consumerId2"}, consumers.Ids)

providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId3", stopTime)
providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId3", stopTime)
consumers, err = providerKeeper.GetConsumersToBeStopped(ctx, stopTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1", "consumerId2", "consumerId3"}, consumers.Ids)

err = providerKeeper.RemoveConsumerToBeStoppedFromStopTime(ctx, "consumerId2", stopTime)
err = providerKeeper.RemoveConsumerToBeStopped(ctx, "consumerId2", stopTime)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeStopped(ctx, stopTime)
require.NoError(t, err)
require.Equal(t, []string{"consumerId1", "consumerId3"}, consumers.Ids)

// also add consumer ids under a different stop time and verify everything under the original stop time is still there
stopTimePlusOneHour := stopTime.Add(time.Hour)
providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId4", stopTimePlusOneHour)
providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId4", stopTimePlusOneHour)
consumers, err = providerKeeper.GetConsumersToBeStopped(ctx, stopTimePlusOneHour)
require.NoError(t, err)
require.Equal(t, []string{"consumerId4"}, consumers.Ids)
Expand All @@ -364,23 +364,23 @@ func TestConsumersToBeStopped(t *testing.T) {
require.Equal(t, []string{"consumerId1", "consumerId3"}, consumers.Ids)

// start removing all consumers from `stopTime`
err = providerKeeper.RemoveConsumerToBeStoppedFromStopTime(ctx, "consumerId3", stopTime)
err = providerKeeper.RemoveConsumerToBeStopped(ctx, "consumerId3", stopTime)
require.NoError(t, err)
err = providerKeeper.RemoveConsumerToBeStoppedFromStopTime(ctx, "consumerId1", stopTime)
err = providerKeeper.RemoveConsumerToBeStopped(ctx, "consumerId1", stopTime)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeStopped(ctx, stopTime)
require.NoError(t, err)
require.Empty(t, consumers.Ids)

// remove from `stopTimePlusOneHour`
err = providerKeeper.RemoveConsumerToBeStoppedFromStopTime(ctx, "consumerId4", stopTimePlusOneHour)
err = providerKeeper.RemoveConsumerToBeStopped(ctx, "consumerId4", stopTimePlusOneHour)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeStopped(ctx, stopTimePlusOneHour)
require.NoError(t, err)
require.Empty(t, consumers.Ids)

// add another consumer for `stopTime`
err = providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId5", stopTime)
err = providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId5", stopTime)
require.NoError(t, err)
consumers, err = providerKeeper.GetConsumersToBeStopped(ctx, stopTime)
require.NoError(t, err)
Expand Down Expand Up @@ -474,9 +474,9 @@ func TestGetInitializedConsumersReadyToLaunch(t *testing.T) {
// no chains to-be-launched exist
require.Empty(t, providerKeeper.GetInitializedConsumersReadyToLaunch(ctx, 5))

providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId1", time.Unix(10, 0))
providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId2", time.Unix(20, 0))
providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, "consumerId3", time.Unix(30, 0))
providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId1", time.Unix(10, 0))
providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId2", time.Unix(20, 0))
providerKeeper.AppendConsumerToBeLaunched(ctx, "consumerId3", time.Unix(30, 0))

// time has not yet reached the spawn time of "consumerId1"
ctx = ctx.WithBlockTime(time.Unix(9, 999999999))
Expand Down Expand Up @@ -507,9 +507,9 @@ func TestGetLaunchedConsumersReadyToStop(t *testing.T) {
// no chains to-be-stopped exist
require.Empty(t, providerKeeper.GetLaunchedConsumersReadyToStop(ctx, 3))

providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId1", time.Unix(10, 0))
providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId2", time.Unix(20, 0))
providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, "consumerId3", time.Unix(30, 0))
providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId1", time.Unix(10, 0))
providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId2", time.Unix(20, 0))
providerKeeper.AppendConsumerToBeStopped(ctx, "consumerId3", time.Unix(30, 0))

// time has not yet reached the stop time of "consumerId1"
ctx = ctx.WithBlockTime(time.Unix(9, 999999999))
Expand Down
6 changes: 3 additions & 3 deletions x/ccv/provider/keeper/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (k Keeper) BeginBlockInit(ctx sdk.Context) {
}
// Remove consumer to prevent re-trying launching this chain.
// We would only try to re-launch this chain if a new `MsgUpdateConsumer` message is sent.
k.RemoveConsumerToBeLaunchedFromSpawnTime(ctx, consumerId, record.SpawnTime)
k.RemoveConsumerToBeLaunched(ctx, consumerId, record.SpawnTime)

cachedCtx, writeFn := ctx.CacheContext()
err = k.LaunchConsumer(cachedCtx, consumerId)
Expand All @@ -326,7 +326,7 @@ func (k Keeper) BeginBlockCCR(ctx sdk.Context) {

stopTime, err := k.GetConsumerStopTime(ctx, consumerId)
if err != nil {
k.Logger(ctx).Info("chain could not be stopped",
k.Logger(ctx).Error("chain could not be stopped",
"consumerId", consumerId,
"err", err.Error())
continue
Expand All @@ -341,7 +341,7 @@ func (k Keeper) BeginBlockCCR(ctx sdk.Context) {
}

k.SetConsumerPhase(cachedCtx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_STOPPED)
k.RemoveConsumerToBeStoppedFromStopTime(ctx, consumerId, stopTime)
k.RemoveConsumerToBeStopped(ctx, consumerId, stopTime)

// The cached context is created with a new EventManager so we merge the event into the original context
ctx.EventManager().EmitEvents(cachedCtx.EventManager().Events())
Expand Down
8 changes: 4 additions & 4 deletions x/ccv/provider/keeper/proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ func TestBeginBlockInit(t *testing.T) {
providerKeeper.SetConsumerInitializationParameters(ctx, fmt.Sprintf("%d", i), r)
// set up the chains in their initialized phase, hence they could launch
providerKeeper.SetConsumerPhase(ctx, fmt.Sprintf("%d", i), providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED)
providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, fmt.Sprintf("%d", i), r.SpawnTime)
providerKeeper.AppendConsumerToBeLaunched(ctx, fmt.Sprintf("%d", i), r.SpawnTime)
}
for i, r := range powerShapingParameters {
providerKeeper.SetConsumerPowerShapingParameters(ctx, fmt.Sprintf("%d", i), r)
Expand Down Expand Up @@ -678,11 +678,11 @@ func TestBeginBlockCCR(t *testing.T) {
chainIds := []string{"chain1", "chain2", "chain3"}
consumerIds := []string{"consumerId1", "consumerId2", "consumerId3"}
providerKeeper.SetConsumerStopTime(ctx, consumerIds[0], now.Add(-time.Hour))
providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, consumerIds[0], now.Add(-time.Hour))
providerKeeper.AppendConsumerToBeStopped(ctx, consumerIds[0], now.Add(-time.Hour))
providerKeeper.SetConsumerStopTime(ctx, consumerIds[1], now)
providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, consumerIds[1], now)
providerKeeper.AppendConsumerToBeStopped(ctx, consumerIds[1], now)
providerKeeper.SetConsumerStopTime(ctx, consumerIds[2], now.Add(time.Hour))
providerKeeper.AppendConsumerToBeStoppedOnStopTime(ctx, consumerIds[2], now.Add(time.Hour))
providerKeeper.AppendConsumerToBeStopped(ctx, consumerIds[2], now.Add(time.Hour))

//
// Mock expectations
Expand Down
1 change: 1 addition & 0 deletions x/ccv/provider/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ var (
ErrInvalidTransformToOptIn = errorsmod.Register(ModuleName, 40, "invalid transform to Opt In chain")
ErrCannotCreateTopNChain = errorsmod.Register(ModuleName, 41, "cannot create Top N chain outside permissionlessly")
ErrCannotPrepareForLaunch = errorsmod.Register(ModuleName, 42, "cannot prepare chain for launch")
ErrInvalidStopTime = errorsmod.Register(ModuleName, 43, "invalid stop time")
)

0 comments on commit 54fd3e1

Please sign in to comment.