mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
Regular → Executable
+9
-2
@@ -1,3 +1,5 @@
|
||||
// Package noop provides a no-operation upgrade handler for testing and development.
|
||||
// This upgrade performs no actual state migrations but runs module migrations.
|
||||
package noop
|
||||
|
||||
import (
|
||||
@@ -8,10 +10,12 @@ import (
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
|
||||
"github.com/sonr-io/snrd/app/upgrades"
|
||||
"github.com/sonr-io/sonr/app/upgrades"
|
||||
)
|
||||
|
||||
// NewUpgrade constructor
|
||||
// NewUpgrade creates a new no-operation upgrade with the specified semantic version.
|
||||
// This upgrade is typically used for testing upgrade mechanisms without performing
|
||||
// actual state changes beyond standard module migrations.
|
||||
func NewUpgrade(semver string) upgrades.Upgrade {
|
||||
return upgrades.Upgrade{
|
||||
UpgradeName: semver,
|
||||
@@ -23,6 +27,9 @@ func NewUpgrade(semver string) upgrades.Upgrade {
|
||||
}
|
||||
}
|
||||
|
||||
// CreateUpgradeHandler creates an upgrade handler that performs only module migrations.
|
||||
// It does not perform any custom upgrade logic, making it suitable for minor version
|
||||
// upgrades that only require standard module migrations.
|
||||
func CreateUpgradeHandler(
|
||||
mm upgrades.ModuleManager,
|
||||
configurator module.Configurator,
|
||||
|
||||
Reference in New Issue
Block a user