Skip to content

Commit dd94f41

Browse files
committed
remove execution stage from add shchedule
1 parent 16ecc87 commit dd94f41

File tree

5 files changed

+38
-91
lines changed

5 files changed

+38
-91
lines changed

proto/secret/cron/schedule.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ message Schedule {
2323
repeated MsgExecuteContract msgs = 3 [(gogoproto.nullable) = false];
2424
// Last execution's block height
2525
uint64 last_execute_height = 4;
26-
// Stage when messages will be executed
27-
// ExecutionStage execution_stage = 5;
2826
}
2927

3028
// Defines the contract and the message to pass

proto/secret/cron/tx.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ message MsgAddSchedule {
3838
uint64 period = 3;
3939
// Msgs that will be executed every certain number of blocks, specified in the `period` field
4040
repeated MsgExecuteContract msgs = 4 [(gogoproto.nullable) = false];
41-
// Stage when messages will be executed
42-
ExecutionStage execution_stage = 5;
4341
}
4442

4543
// Defines the response structure for executing a MsgAddSchedule message.

x/cron/keeper/msg_server_test.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ func TestMsgAddScheduleValidate(t *testing.T) {
3333
Msg: "msg",
3434
},
3535
},
36-
ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER,
3736
},
3837
"authority is invalid",
3938
},
@@ -49,7 +48,6 @@ func TestMsgAddScheduleValidate(t *testing.T) {
4948
Msg: "msg",
5049
},
5150
},
52-
ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER,
5351
},
5452
"authority is invalid",
5553
},
@@ -65,7 +63,6 @@ func TestMsgAddScheduleValidate(t *testing.T) {
6563
Msg: "msg",
6664
},
6765
},
68-
ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER,
6966
},
7067
"name is invalid",
7168
},
@@ -81,18 +78,16 @@ func TestMsgAddScheduleValidate(t *testing.T) {
8178
Msg: "msg",
8279
},
8380
},
84-
ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER,
8581
},
8682
"period is invalid",
8783
},
8884
{
8985
"empty msgs",
9086
types.MsgAddSchedule{
91-
Authority: k.GetAuthority(),
92-
Name: "name",
93-
Period: 3,
94-
Msgs: []types.MsgExecuteContract{},
95-
ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER,
87+
Authority: k.GetAuthority(),
88+
Name: "name",
89+
Period: 3,
90+
Msgs: []types.MsgExecuteContract{},
9691
},
9792
"msgs should not be empty",
9893
},
@@ -108,7 +103,6 @@ func TestMsgAddScheduleValidate(t *testing.T) {
108103
Msg: "msg",
109104
},
110105
},
111-
ExecutionStage: 7,
112106
},
113107
"execution stage is invalid",
114108
},

x/cron/types/tx.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ func (msg *MsgAddSchedule) Validate() error {
4545
return errors.Wrap(sdkerrors.ErrInvalidRequest, "msgs should not be empty")
4646
}
4747

48-
if _, ok := ExecutionStage_name[int32(msg.ExecutionStage)]; !ok {
49-
return errors.Wrap(sdkerrors.ErrInvalidRequest, "execution stage is invalid")
50-
}
51-
5248
return nil
5349
}
5450

x/cron/types/tx.pb.go

Lines changed: 34 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)