refactor: export HasRegisterServices (#23488)
This commit is contained in:
+2
-9
@@ -8,7 +8,6 @@ import (
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
cmtcrypto "github.com/cometbft/cometbft/crypto"
|
||||
cmted25519 "github.com/cometbft/cometbft/crypto/ed25519"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
@@ -80,8 +79,8 @@ func (a *App) RegisterModules(modules ...module.AppModule) error {
|
||||
|
||||
if mod, ok := appModule.(module.HasServices); ok {
|
||||
mod.RegisterServices(a.configurator)
|
||||
} else if module, ok := appModule.(hasServicesV1); ok {
|
||||
if err := module.RegisterServices(a.configurator); err != nil {
|
||||
} else if mod, ok := appModule.(module.HasRegisterServices); ok {
|
||||
if err := mod.RegisterServices(a.configurator); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -267,12 +266,6 @@ func (a *App) UnsafeFindStoreKey(storeKey string) storetypes.StoreKey {
|
||||
return a.storeKeys[i]
|
||||
}
|
||||
|
||||
// hasServicesV1 is the interface for registering service in baseapp Cosmos SDK.
|
||||
// This API is part of core/appmodule but commented out for dependencies.
|
||||
type hasServicesV1 interface {
|
||||
RegisterServices(grpc.ServiceRegistrar) error
|
||||
}
|
||||
|
||||
// ValidatorKeyProvider returns a function that generates a private key for use by comet.
|
||||
func (a *App) ValidatorKeyProvider() KeyGenF {
|
||||
return func() (cmtcrypto.PrivKey, error) {
|
||||
|
||||
Reference in New Issue
Block a user