parent
d23caef6f6
commit
2049c4b82a
@ -38,6 +38,7 @@ func (a *AppBuilder) Build(db dbm.DB, traceStore io.Writer, baseAppOptions ...fu
|
||||
|
||||
a.app.BaseApp = bApp
|
||||
a.app.configurator = module.NewConfigurator(a.app.cdc, a.app.MsgServiceRouter(), a.app.GRPCQueryRouter())
|
||||
|
||||
if err := a.app.ModuleManager.RegisterServices(a.app.configurator); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -33,12 +33,12 @@ func NewEventManager(ctx context.Context) event.Manager {
|
||||
}
|
||||
|
||||
// Emit emits an typed event that is defined in the protobuf file.
|
||||
// In the future these events will be added to consensus
|
||||
// In the future these events will be added to consensus.
|
||||
func (e Events) Emit(ctx context.Context, event protoiface.MessageV1) error {
|
||||
return e.EventManagerI.EmitTypedEvent(event)
|
||||
}
|
||||
|
||||
// EmitKV emits a key value pair event
|
||||
// EmitKV emits a key value pair event.
|
||||
func (e Events) EmitKV(ctx context.Context, eventType string, attrs ...event.Attribute) error {
|
||||
attributes := make([]sdk.Attribute, 0, len(attrs))
|
||||
|
||||
@ -46,15 +46,12 @@ func (e Events) EmitKV(ctx context.Context, eventType string, attrs ...event.Att
|
||||
attributes = append(attributes, sdk.NewAttribute(attr.Key, attr.Value))
|
||||
}
|
||||
|
||||
events := sdk.Events{
|
||||
sdk.NewEvent(eventType, attributes...),
|
||||
}
|
||||
e.EventManagerI.EmitEvents(events)
|
||||
e.EventManagerI.EmitEvents(sdk.Events{sdk.NewEvent(eventType, attributes...)})
|
||||
return nil
|
||||
}
|
||||
|
||||
// Emit emits an typed event that is defined in the protobuf file.
|
||||
// In the future these events will be added to consensus
|
||||
// In the future these events will be added to consensus.
|
||||
func (e Events) EmitNonConsensus(ctx context.Context, event protoiface.MessageV1) error {
|
||||
return e.EventManagerI.EmitTypedEvent(event)
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) (
|
||||
|
||||
// At startup, check that all proto annotations are correct.
|
||||
if err := msgservice.ValidateProtoAnnotations(protoFiles); err != nil {
|
||||
// Once we switch to using protoreflect-based antehandlers, we might
|
||||
// Once we switch to using protoreflect-based ante handlers, we might
|
||||
// want to panic here instead of logging a warning.
|
||||
_, _ = fmt.Fprintln(os.Stderr, err.Error())
|
||||
}
|
||||
@ -178,10 +178,12 @@ func ProvideInterfaceRegistry(customGetSigners []signing.CustomGetSigner) (codec
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = interfaceRegistry.SigningContext().Validate()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return interfaceRegistry, nil
|
||||
}
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@ func NewAutoCLIQueryService(appModules map[string]interface{}) *AutoCLIQueryServ
|
||||
}
|
||||
|
||||
// ExtractAutoCLIOptions extracts autocli ModuleOptions from the provided app modules.
|
||||
//
|
||||
// Example Usage:
|
||||
//
|
||||
// ExtractAutoCLIOptions(ModuleManager.Modules)
|
||||
|
||||
@ -18,7 +18,7 @@ type AppI interface {
|
||||
Name() string
|
||||
|
||||
// The application types codec.
|
||||
// NOTE: This shoult be sealed before being returned.
|
||||
// NOTE: This should NOT be sealed before being returned.
|
||||
LegacyAmino() *codec.LegacyAmino
|
||||
|
||||
// Application updates every begin block.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user