-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events Tracking / Tendermint v0.32.0 Update #4541
Conversation
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏 👏 stoked - few changes I'll just push the typo upgrades
@@ -156,6 +147,18 @@ func (keeper BaseSendKeeper) SendCoins( | |||
if !amt.IsValid() { | |||
return sdk.ErrInvalidCoins(amt.String()) | |||
} | |||
|
|||
ctx.EventManager().EmitEvents(sdk.Events{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emit
a bit confusing here although it makes sense... Does AddEvents
not make sense?
Refactor the SDK to use the ABCI events semantics:
x/{module}/tags/tags.go
=>x/{module}/types/events.go
docs/specs
to reflect all new event typesEvent(s)
type(s)Context
to use newEventManager
EventManager
EventManager
Any component (e.g. BeginBlocker, message handler, etc...) wishing to emit an event must do so
through
ctx.EventManger().EmitEvent(s)
.To reset or wipe emitted events:
ctx = ctx.WithEventManager(sdk.NewEventManager())
To get all emitted events:
events := ctx.EventManager().Events()
To perform the minimal review, simply review each spec's
xx_events.md
file as the structural code changes are trivial (but verbose).closes: #4387
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: