-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dwedul/v1.20.0-spec-links
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Suppress the events emitted during the metadata migration that changes how scope value owners are recorded [PR 2195](https://github.com/provenance-io/provenance/pull/2195). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package sdk | ||
|
||
import ( | ||
abci "github.com/cometbft/cometbft/abci/types" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/gogoproto/proto" | ||
) | ||
|
||
// NoOpEventManager is an event manager that satisfies the sdk.EventManagerI interface, but does nothing. | ||
type NoOpEventManager struct{} | ||
|
||
var _ sdk.EventManagerI = (*NoOpEventManager)(nil) | ||
|
||
// NewNoOpEventManager returns a new event manager that does nothing. | ||
func NewNoOpEventManager() *NoOpEventManager { | ||
return &NoOpEventManager{} | ||
} | ||
|
||
// Events returns sdk.EmptyEvents(). | ||
func (x NoOpEventManager) Events() sdk.Events { | ||
// Returning sdk.EmptyEvents() here (instead of nil) to match sdk.EventManager behavior. | ||
return sdk.EmptyEvents() | ||
} | ||
|
||
// ABCIEvents returns sdk.EmptyABCIEvents(). | ||
func (x NoOpEventManager) ABCIEvents() []abci.Event { | ||
// Returning sdk.EmptyABCIEvents() here (instead of nil) to match sdk.EventManager behavior. | ||
return sdk.EmptyABCIEvents() | ||
} | ||
|
||
// EmitTypedEvent ignores the provided argument, does nothing, and always returns nil. | ||
func (x NoOpEventManager) EmitTypedEvent(_ proto.Message) error { | ||
return nil | ||
} | ||
|
||
// EmitTypedEvents ignores the provided arguments, does nothing, and always returns nil. | ||
func (x NoOpEventManager) EmitTypedEvents(_ ...proto.Message) error { | ||
return nil | ||
} | ||
|
||
// EmitEvent ignores the provided event and does nothing. | ||
func (x NoOpEventManager) EmitEvent(_ sdk.Event) {} | ||
|
||
// EmitEvents ignores the provided events and does nothing. | ||
func (x NoOpEventManager) EmitEvents(_ sdk.Events) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters