Enum libp2p_gossipsub::GossipsubEvent [−][src]
pub enum GossipsubEvent {
Message {
propagation_source: PeerId,
message_id: MessageId,
message: GossipsubMessage,
},
Subscribed {
peer_id: PeerId,
topic: TopicHash,
},
Unsubscribed {
peer_id: PeerId,
topic: TopicHash,
},
}Event that can be emitted by the gossipsub behaviour.
Variants
A message has been received.
Show fields
Fields of Message
propagation_source: PeerIdThe peer that forwarded us this message.
message_id: MessageIdThe MessageId of the message. This should be referenced by the application when
validating a message (if required).
message: GossipsubMessageThe decompressed message itself.
A remote subscribed to a topic.
Show fields
A remote unsubscribed from a topic.