Skip to content

Commit

Permalink
check ack nil
Browse files Browse the repository at this point in the history
  • Loading branch information
technicallyty committed Jan 30, 2025
1 parent d3146d3 commit 6c23a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/core/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func (k *Keeper) RecvPacket(ctx context.Context, msg *channeltypes.MsgRecvPacket
if err := k.BranchService.Execute(ctx, func(subCtx context.Context) error {
// Perform application logic callback
ack = cbs.OnRecvPacket(subCtx, channelVersion, msg.Packet, relayer)
if !ack.Success() {
if ack != nil && !ack.Success() {
// we must return an error here so that false positive events are not emitted
events = sdk.UnwrapSDKContext(subCtx).EventManager().Events()
return channeltypes.ErrFailedAcknowledgement
Expand Down

0 comments on commit 6c23a79

Please sign in to comment.