refactor(core): remove consensus events (#19757)
This commit is contained in:
parent
d54335e1f9
commit
0cdf3cf97c
@ -18,9 +18,7 @@ type Service interface {
|
||||
type Manager interface {
|
||||
// Emit emits events represented as a protobuf message (as described in ADR 032).
|
||||
//
|
||||
// Callers SHOULD assume that these events may be included in consensus. These events
|
||||
// MUST be emitted deterministically and adding, removing or changing these events SHOULD
|
||||
// be considered state-machine breaking.
|
||||
// Callers SHOULD assume that these events will not be included in consensus.
|
||||
Emit(event protoiface.MessageV1) error
|
||||
|
||||
// EmitKV emits an event based on an event and kv-pair attributes.
|
||||
@ -28,11 +26,4 @@ type Manager interface {
|
||||
// These events will not be part of consensus and adding, removing or changing these events is
|
||||
// not a state-machine breaking change.
|
||||
EmitKV(eventType string, attrs ...Attribute) error
|
||||
|
||||
// EmitNonConsensus emits events represented as a protobuf message (as described in ADR 032), without
|
||||
// including it in blockchain consensus.
|
||||
//
|
||||
// These events will not be part of consensus and adding, removing or changing events is
|
||||
// not a state-machine breaking change.
|
||||
EmitNonConsensus(event protoiface.MessageV1) error
|
||||
}
|
||||
|
||||
@ -49,9 +49,3 @@ func (e Events) EmitKV(eventType string, attrs ...event.Attribute) error {
|
||||
e.EventManagerI.EmitEvents(sdk.Events{sdk.NewEvent(eventType, attributes...)})
|
||||
return nil
|
||||
}
|
||||
|
||||
// EmitNonConsensus emits an typed event that is defined in the protobuf file.
|
||||
// In the future these events will be added to consensus.
|
||||
func (e Events) EmitNonConsensus(event protoiface.MessageV1) error {
|
||||
return e.EventManagerI.EmitTypedEvent(event)
|
||||
}
|
||||
|
||||
@ -33,10 +33,6 @@ func (e eventService) EmitKV(eventType string, attrs ...event.Attribute) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e eventService) EmitNonConsensus(event protoiface.MessageV1) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e eventService) EventManager(ctx context.Context) event.Manager { return e }
|
||||
|
||||
var _ InterfaceRegistry = (*interfaceRegistry)(nil)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user