refactor(core)!: clean-up core and simplify preblock (#19672)
This commit is contained in:
@@ -11,8 +11,7 @@ type HasConsensusVersion interface {
|
||||
ConsensusVersion() uint64
|
||||
}
|
||||
|
||||
// HasMigrations is implemented by a module which upgrades or has upgraded
|
||||
// to a new consensus version.
|
||||
// HasMigrations is implemented by a module which upgrades or has upgraded to a new consensus version.
|
||||
type HasMigrations interface {
|
||||
AppModule
|
||||
HasConsensusVersion
|
||||
@@ -21,6 +20,7 @@ type HasMigrations interface {
|
||||
RegisterMigrations(MigrationRegistrar) error
|
||||
}
|
||||
|
||||
// MigrationRegistrar is the interface for registering in-place store migrations.
|
||||
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
|
||||
|
||||
@@ -19,6 +19,14 @@ type AppModule interface {
|
||||
IsOnePerModuleType()
|
||||
}
|
||||
|
||||
// HasPreBlocker is the extension interface that modules should implement to run
|
||||
// custom logic before BeginBlock.
|
||||
type HasPreBlocker interface {
|
||||
AppModule
|
||||
// PreBlock is method that will be run before BeginBlock.
|
||||
PreBlock(context.Context) error
|
||||
}
|
||||
|
||||
// HasBeginBlocker is the extension interface that modules should implement to run
|
||||
// custom logic before transaction processing in a block.
|
||||
type HasBeginBlocker interface {
|
||||
Reference in New Issue
Block a user