- "packet sequence ≠ next send sequence (%d ≠ %d)", packet.GetSequence(), nextSequenceSend,
- )
- }
-
- nextSequenceSend++
- k.SetNextSequenceSend(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), nextSequenceSend)
- k.SetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), types.CommitPacket(packet))
-
- // Emit Event with Packet data along with other packet information for relayer to pick up
- // and relay to other chain
- ctx.EventManager().EmitEvents(sdk.Events{
- sdk.NewEvent(
- types.EventTypeSendPacket,
- sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())),
- sdk.NewAttribute(types.AttributeKeyTimeoutHeight, fmt.Sprintf("%d", packet.GetTimeoutHeight())),
- sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())),
- sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())),
- sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()),
- sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()),
- sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()),
- sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()),