Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent generate new avail seed in roller migrate #517

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cmd/migrate/v_0_1_12.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ func (v *VersionMigratorV0112) PerformMigration(rlpCfg config.RollappConfig) err
rlpCfg.DA = config.Local
return config.WriteConfigToTOML(rlpCfg)
}
if rlpCfg.DA == config.Avail {
availNewCfgPath := avail.GetCfgFilePath(rlpCfg.Home)
if err := utils.MoveFile(filepath.Join(rlpCfg.Home, avail.ConfigFileName), availNewCfgPath); err != nil {
return err
}
}
da := datalayer.NewDAManager(rlpCfg.DA, rlpCfg.Home)
sequencerDaConfig := da.GetSequencerDAConfig()
if sequencerDaConfig == "" {
Expand All @@ -29,11 +35,5 @@ func (v *VersionMigratorV0112) PerformMigration(rlpCfg config.RollappConfig) err
if err := utils.UpdateFieldInToml(dymintTomlPath, "da_config", sequencerDaConfig); err != nil {
return err
}
if rlpCfg.DA == config.Avail {
availNewCfgPath := avail.GetCfgFilePath(rlpCfg.Home)
if err := utils.MoveFile(filepath.Join(rlpCfg.Home, avail.ConfigFileName), availNewCfgPath); err != nil {
return err
}
}
return nil
}
Loading