Skip to content

Commit

Permalink
try fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
likhita-809 committed May 7, 2024
1 parent 0641345 commit 5fda275
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions x/mint/keeper/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,17 @@ func (m Migrator) Migrate2to3(ctx context.Context) error {

// Migrate3to4 migrates from version 3 to 4.
func (m Migrator) Migrate3to4(ctx context.Context) error {
lre, err := m.keeper.LastReductionEpoch.Get(ctx)
if err != nil {
return err
}

// Initialize the new LastReductionEpoch with the default value
defaultGenesisState := types.DefaultGenesisState()
reductionStartedEpoch := defaultGenesisState.ReductionStartedEpoch
err := m.keeper.LastReductionEpoch.Set(ctx, reductionStartedEpoch)
if err != nil {
return err
}
return v4.MigrateStore(ctx, m.keeper.LastReductionEpoch)
}

0 comments on commit 5fda275

Please sign in to comment.