NagyZoltanPeter 1913a36007
refactor(node): thread WakuEnvelope through dispatch; MessageSeenEvent carries it
subscription_manager relay handlers take the envelope (one async capture instead
of topic+msg), reusing envelope.hash for store-sync ingress. MessageSeenEvent
now carries the WakuEnvelope; the filter-client push emit builds one, and the
recv_service listener reuses envelope.hash (optional precomputed-hash param) to
skip recomputation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 05:44:32 +02:00

20 lines
639 B
Nim

import brokers/event_broker
import logos_delivery/api/types
import logos_delivery/waku/waku_core/topics/pubsub_topic
import logos_delivery/waku/waku_core/message
export event_broker, pubsub_topic, message
EventBroker:
# Internal event emitted when a message arrives from the network via any protocol.
# Carries the WakuEnvelope so listeners reuse the precomputed hash instead of
# recomputing it.
type MessageSeenEvent* = object
envelope*: WakuEnvelope
# Emitted by the health monitor when overall node connectivity changes.
EventBroker:
type EventConnectionStatusChange* = object
connectionStatus*: ConnectionStatus