feat: add endblocker with valsetupdate type (#15829)

This commit is contained in:
Marko
2023-04-14 09:41:29 +00:00
committed by GitHub
parent 722bea5b40
commit 8d6c23faa4
18 changed files with 200 additions and 73 deletions
+2 -4
View File
@@ -4,13 +4,11 @@ import (
"encoding/json"
"fmt"
abci "github.com/cometbft/cometbft/abci/types"
"golang.org/x/exp/slices"
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
storetypes "cosmossdk.io/store/types"
abci "github.com/cometbft/cometbft/abci/types"
"golang.org/x/exp/slices"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
+1 -8
View File
@@ -1,8 +1,6 @@
package runtime
import (
"context"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
@@ -26,14 +24,9 @@ func (a *App) registerRuntimeServices(cfg module.Configurator) error {
}
// ======================================================
// ValidatorUpdateService & BlockInfoService
// BlockInfoService
// ======================================================
// ValidatorUpdateService is the service that runtime will provide to the module that sets validator updates.
type ValidatorUpdateService interface {
SetValidatorUpdates(context.Context, []abci.ValidatorUpdate)
}
// BlockInfoService is the service that runtime will provide to modules which need Comet block information.
type BlockInfoService interface {
GetHeight() int64 // GetHeight returns the height of the block