Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(gossipsub): send more specific messages to
ConnectionHandler
Previously, the `NetworkBehaviour` constructed a `proto::RPC` type and sent that into an unbounded queue to the `ConnectionHandler`. With such a broad type, the `ConnectionHandler` cannot do any prioritization on which messages to drop if a connection slows down. To enable a more fine-granular handling of messages, we make the interface between `NetworkBehaviour` and `ConnectionHandler` more specific by introducing an `RpcOut` type that differentiates between `Publish`, `Forward`, `Subscribe`, etc. Related: libp2p#4667. Pull-Request: libp2p#4811.
- Loading branch information