Skip to content

Commit

Permalink
fix: Prevent generate new avail seed in roller migrate (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItayLevyOfficial authored Sep 6, 2023
1 parent 3d60a59 commit ecfe396
Showing 1 changed file with 6 additions and 6 deletions.
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
}

0 comments on commit ecfe396

Please sign in to comment.