refactor(gossipsub): don't store messages within Arc (#3243)

Currently, we store messages to be sent to the `ConnectionHandler` in an `Arc`. However, we never actually clone these messages as we can see with this patch, hence we remove this wrapping.

Related: https://github.com/libp2p/rust-libp2p/pull/3242
This commit is contained in:
Thomas Eizinger
2022-12-20 11:59:25 +11:00
committed by GitHub
parent de61a74d33
commit 88fa8e66b8
3 changed files with 108 additions and 118 deletions

View File

@ -64,7 +64,7 @@ pub enum HandlerEvent {
}
/// A message sent from the behaviour to the handler.
#[derive(Debug, Clone)]
#[derive(Debug)]
pub enum GossipsubHandlerIn {
/// A gossipsub message to send.
Message(crate::rpc_proto::Rpc),