Skip to content

Commit

Permalink
Add comment for migration
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Jun 12, 2024
1 parent 45ac58c commit b390255
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x/ccv/provider/migrations/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ func (m Migrator) Migrate3to4(ctx sdktypes.Context) error {
return nil
}

// MigrateXtoY migrates x/ccvprovider state from consensus version 4 to 5.
// Migrate4to5 migrates x/ccvprovider state from consensus version 4 to 5.
// The migration consists of setting a top N of 95 for all registered consumer chains.
func (m Migrator) Migrate4to5(ctx sdktypes.Context) error {
v5.MigrateTopNForRegisteredChains(ctx, m.providerKeeper)
return nil
}

// Migrate5to6 migrates x/ccvprovider state from consensus version 5 to 6.
// The migration consists of computing and storing the minimal power in the top N for all registered consumer chains.
func (m Migrator) Migrate5to6(ctx sdktypes.Context) error {
v6.MigrateMinPowerInTopN(ctx, m.providerKeeper)
return nil
Expand Down

0 comments on commit b390255

Please sign in to comment.