From f2076f351ae983a9efb3dce3cee01522086be2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20G=2E=20=C3=96zt=C3=BCrk?= Date: Thu, 14 Apr 2022 10:37:57 +0300 Subject: [PATCH] fix(pkg/chaincmd): use unsafe-reset-all cmd from tendermint for => v0.45.3 (#2350) --- ignite/pkg/chaincmd/chaincmd.go | 10 ++++++++-- ignite/pkg/cosmosver/cosmosver.go | 7 ++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ignite/pkg/chaincmd/chaincmd.go b/ignite/pkg/chaincmd/chaincmd.go index 4f9add5603..9145caf747 100644 --- a/ignite/pkg/chaincmd/chaincmd.go +++ b/ignite/pkg/chaincmd/chaincmd.go @@ -21,6 +21,7 @@ const ( commandQuery = "query" commandUnsafeReset = "unsafe-reset-all" commandExport = "export" + commandTendermint = "tendermint" optionHome = "--home" optionNode = "--node" @@ -487,9 +488,14 @@ func (c ChainCmd) ShowNodeIDCommand() step.Option { // UnsafeResetCommand returns the command to reset the blockchain database func (c ChainCmd) UnsafeResetCommand() step.Option { - command := []string{ - commandUnsafeReset, + var command []string + + if c.sdkVersion.GTE(cosmosver.StargateFortyFiveThreeVersion) { + command = append(command, commandTendermint) } + + command = append(command, commandUnsafeReset) + return c.daemonCommand(command) } diff --git a/ignite/pkg/cosmosver/cosmosver.go b/ignite/pkg/cosmosver/cosmosver.go index efb658ccdd..5addbeb016 100644 --- a/ignite/pkg/cosmosver/cosmosver.go +++ b/ignite/pkg/cosmosver/cosmosver.go @@ -33,9 +33,10 @@ type Version struct { } var ( - MaxLaunchpadVersion = newVersion("0.39.99", Launchpad) - StargateFortyVersion = newVersion("0.40.0", Stargate) - StargateFortyFourVersion = newVersion("0.44.0-alpha", Stargate) + MaxLaunchpadVersion = newVersion("0.39.99", Launchpad) + StargateFortyVersion = newVersion("0.40.0", Stargate) + StargateFortyFourVersion = newVersion("0.44.0-alpha", Stargate) + StargateFortyFiveThreeVersion = newVersion("0.45.3", Stargate) ) var (