-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core)!: clean-up core and simplify preblock (#19672)
- Loading branch information
1 parent
defab1a
commit fea88d1
Showing
21 changed files
with
110 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
package appmodule | ||
|
||
import "context" | ||
import ( | ||
"cosmossdk.io/core/appmodule/v2" | ||
) | ||
|
||
type MigrationRegistrar interface { | ||
// Register registers an in-place store migration for a module. The | ||
// handler is a migration script to perform in-place migrations from version | ||
// `fromVersion` to version `fromVersion+1`. | ||
// | ||
// EACH TIME a module's ConsensusVersion increments, a new migration MUST | ||
// be registered using this function. If a migration handler is missing for | ||
// a particular function, the upgrade logic (see RunMigrations function) | ||
// will panic. If the ConsensusVersion bump does not introduce any store | ||
// changes, then a no-op function must be registered here. | ||
Register(moduleName string, fromVersion uint64, handler func(context.Context) error) error | ||
} | ||
// HasConsensusVersion is the interface for declaring a module consensus version. | ||
type HasConsensusVersion = appmodule.HasConsensusVersion | ||
|
||
// HasMigrations is implemented by a module which upgrades or has upgraded to a new consensus version. | ||
type HasMigrations = appmodule.HasMigrations | ||
|
||
// MigrationRegistrar is the interface for registering in-place store migrations. | ||
type MigrationRegistrar = appmodule.MigrationRegistrar | ||
|
||
// MigrationHandler is the migration function that each module registers. | ||
type MigrationHandler = appmodule.MigrationHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.