Closed wngr closed 2 years ago
I know this is a breaking change, but I think in most use cases it's extremely useful to have that information. Instead of the tuple we could have a custom struct (also for future extensibility)?
cc @rkuhn
I've been thinking about changing this api recently too. How about returning an enum?
pub enum GossipEvent { Subscribed(PeerId), Message(PeerId, Vec<u8>), Unsubscribed(PeerId), }
I know this is a breaking change, but I think in most use cases it's extremely useful to have that information. Instead of the tuple we could have a custom struct (also for future extensibility)?
cc @rkuhn