-
Notifications
You must be signed in to change notification settings - Fork 631
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
refactor: use branch service in recv packet (wip) #7752
base: main
Are you sure you want to change the base?
Conversation
…rshaler for Codec iface
It seems that we can't maintain backwards compatibility here with error prefixing events from the cached context passed to the ibc app in A potential solution could be to do something like this, if we added the If we do not shadow the context variable passed to the func in if err := k.BranchService.Execute(ctx, func(cacheCtx context.Context) error {
// Perform application logic callback
ack = cbs.OnRecvPacket(cacheCtx, channelVersion, msg.Packet, relayer)
if ack == nil || ack.Success() {
// write application state changes for asynchronous and successful acknowledgements
return nil
} else {
events := k.EventService.EventManager(cacheCtx).Events()
for _, evt := range events {
k.EventService.EventManager(ctx).EmitKV(evt.EventType, evt.Attributes...)
}
}
// we must return an error here so that false positive events are not emitted
return channeltypes.ErrFailedAcknowledgement
}); err != nil {
...
} |
Description
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.