diff --git a/cmd/migrate/migrate.go b/cmd/migrate/migrate.go index 2e2252bd..40bca18e 100644 --- a/cmd/migrate/migrate.go +++ b/cmd/migrate/migrate.go @@ -13,6 +13,7 @@ var migrationsRegistry = []VersionMigrator{ &VersionMigratorV014{}, &VersionMigratorV015{}, &VersionMigratorV016{}, + &VersionMigratorV018{}, } func Cmd() *cobra.Command { diff --git a/cmd/migrate/v_0_1_8.go b/cmd/migrate/v_0_1_8.go new file mode 100644 index 00000000..f35b7ca2 --- /dev/null +++ b/cmd/migrate/v_0_1_8.go @@ -0,0 +1,18 @@ +package migrate + +import ( + "github.com/dymensionxyz/roller/config" + "github.com/dymensionxyz/roller/sequencer" + "github.com/dymensionxyz/roller/utils" +) + +type VersionMigratorV018 struct{} + +func (v *VersionMigratorV018) ShouldMigrate(prevVersion VersionData) bool { + return prevVersion.Major < 1 && prevVersion.Minor < 2 && prevVersion.Patch < 8 +} + +func (v *VersionMigratorV018) PerformMigration(rlpCfg config.RollappConfig) error { + dymintTomlPath := sequencer.GetDymintFilePath(rlpCfg.Home) + return utils.UpdateFieldInToml(dymintTomlPath, "empty_blocks_max_time", "60s") +} diff --git a/cmd/run/run.go b/cmd/run/run.go index 026dd683..77dd8a5b 100644 --- a/cmd/run/run.go +++ b/cmd/run/run.go @@ -19,6 +19,12 @@ import ( "github.com/spf13/cobra" ) +var flagNames = struct { + NoOutput string +}{ + NoOutput: "no-output", +} + func Cmd() *cobra.Command { cmd := &cobra.Command{ Use: "run", @@ -47,7 +53,13 @@ func Cmd() *cobra.Command { runRelayerWithRestarts(rollappConfig, serviceConfig) /* ------------------------------ render output ----------------------------- */ - RenderUI(rollappConfig, serviceConfig) + noOutput, err := cmd.Flags().GetBool(flagNames.NoOutput) + utils.PrettifyErrorIfExists(err) + if noOutput { + select {} + } else { + RenderUI(rollappConfig, serviceConfig) + } cancel() spin := utils.GetLoadingSpinner() spin.Suffix = " Stopping rollapp services, please wait..." @@ -57,7 +69,7 @@ func Cmd() *cobra.Command { spin.Stop() }, } - + cmd.Flags().BoolP(flagNames.NoOutput, "", false, "Run the rollapp without rendering the UI.") return cmd }