chore: add a logged warning for merged proto registry when creating baseapp (#24450)
This commit is contained in:
+4
-20
@@ -5,14 +5,12 @@ package simapp
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"os"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/spf13/cast"
|
||||
"io"
|
||||
"maps"
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
|
||||
@@ -56,7 +54,6 @@ import (
|
||||
testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
"github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing"
|
||||
"github.com/cosmos/cosmos-sdk/version"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
@@ -469,7 +466,7 @@ func NewSimApp(
|
||||
|
||||
app.GovKeeper = *govKeeper.SetHooks(
|
||||
govtypes.NewMultiGovHooks(
|
||||
// register the governance hooks
|
||||
// register the governance hooks
|
||||
),
|
||||
)
|
||||
|
||||
@@ -499,7 +496,7 @@ func NewSimApp(
|
||||
|
||||
app.EpochsKeeper.SetHooks(
|
||||
epochstypes.NewMultiEpochHooks(
|
||||
// insert epoch hooks receivers here
|
||||
// insert epoch hooks receivers here
|
||||
),
|
||||
)
|
||||
|
||||
@@ -686,19 +683,6 @@ func NewSimApp(
|
||||
// upgrade.
|
||||
app.setPostHandler()
|
||||
|
||||
// At startup, after all modules have been registered, check that all prot
|
||||
// annotations are correct.
|
||||
protoFiles, err := proto.MergedRegistry()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = msgservice.ValidateProtoAnnotations(protoFiles)
|
||||
if err != nil {
|
||||
// Once we switch to using protoreflect-based antehandlers, we might
|
||||
// want to panic here instead of logging a warning.
|
||||
fmt.Fprintln(os.Stderr, err.Error())
|
||||
}
|
||||
|
||||
if loadLatest {
|
||||
if err := app.LoadLatestVersion(); err != nil {
|
||||
panic(fmt.Errorf("error loading last version: %w", err))
|
||||
|
||||
Reference in New Issue
Block a user