mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-24 07:11:38 +00:00
feat: allow sent messages seen as subscribed (#1520)
* feat: allow sent messages seen as subscribed minor feature to allow mimicing the behaviour expected by ipfs api tests. * refactor: rename per review comments * refactor: rename Floodsub::options to config * chore: update changelog * Update CHANGELOG.md Co-Authored-By: Max Inden <mail@max-inden.de> Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
@ -27,16 +27,16 @@ use futures::{Future, io::{AsyncRead, AsyncWrite}};
|
||||
|
||||
/// Implementation of `ConnectionUpgrade` for the floodsub protocol.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct FloodsubConfig {}
|
||||
pub struct FloodsubProtocol {}
|
||||
|
||||
impl FloodsubConfig {
|
||||
/// Builds a new `FloodsubConfig`.
|
||||
pub fn new() -> FloodsubConfig {
|
||||
FloodsubConfig {}
|
||||
impl FloodsubProtocol {
|
||||
/// Builds a new `FloodsubProtocol`.
|
||||
pub fn new() -> FloodsubProtocol {
|
||||
FloodsubProtocol {}
|
||||
}
|
||||
}
|
||||
|
||||
impl UpgradeInfo for FloodsubConfig {
|
||||
impl UpgradeInfo for FloodsubProtocol {
|
||||
type Info = &'static [u8];
|
||||
type InfoIter = iter::Once<Self::Info>;
|
||||
|
||||
@ -45,7 +45,7 @@ impl UpgradeInfo for FloodsubConfig {
|
||||
}
|
||||
}
|
||||
|
||||
impl<TSocket> InboundUpgrade<TSocket> for FloodsubConfig
|
||||
impl<TSocket> InboundUpgrade<TSocket> for FloodsubProtocol
|
||||
where
|
||||
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
|
||||
{
|
||||
|
Reference in New Issue
Block a user