Skip to content

Commit

Permalink
Sd
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWeng committed Apr 22, 2023
1 parent df11ad9 commit ae8d2fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions x/mint/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func validateTokenReleaseSchedule(i interface{}) error {
if startDate.Before(prevReleaseEndDate) {
return fmt.Errorf("error: overlapping release period detected startDate=%s < prevReleaseEndDate=%s", startDate, prevReleaseEndDate)
}
prevReleaseEndDate = endDate
}

return nil
Expand Down
5 changes: 2 additions & 3 deletions x/mint/types/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestValidateTokenReleaseSchedule(t *testing.T) {
assert.Contains(t, err.Error(), "overlapping release period detected")
})

t.Run("end date equals start date of next period", func(t *testing.T) {
t.Run("end date equals start date of next period is fine", func(t *testing.T) {
endEqualsStart := []ScheduledTokenRelease{
{
StartDate: "2023-01-01",
Expand All @@ -152,7 +152,6 @@ func TestValidateTokenReleaseSchedule(t *testing.T) {
},
}
err := validateTokenReleaseSchedule(endEqualsStart)
assert.NotNil(t, err)
assert.Contains(t, err.Error(), "overlapping release period detected")
assert.Nil(t, err)
})
}
4 changes: 2 additions & 2 deletions x/oracle/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func WeightedOperations(
}

// SimulateMsgAggregateExchangeRateVote generates a MsgAggregateExchangeRateVote with random values.
// nolint: funlen
//nolint: funlen
func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation {
return func(
r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
Expand Down Expand Up @@ -122,7 +122,7 @@ func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankK
}

// SimulateMsgDelegateFeedConsent generates a MsgDelegateFeedConsent with random values.
// nolint: funlen
//nolint: funlen
func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation {
return func(
r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
Expand Down

0 comments on commit ae8d2fd

Please sign in to comment.