mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-21 22:01:34 +00:00
[identify] Implement /ipfs/id/push/1.0.0 alongside some refactoring. (#1999)
* Implement /ipfs/id/push/1.0.0 alongside some refactoring. * Implement /ipfs/id/push/1.0.0, i.e. the ability to actively push information of the local peer to specific remotes. * Make the initial delay as well as the recurring delay for the periodic identification requests configurable, introducing `IdentifyConfig`. * Fix test. * Fix example. * Update protocols/identify/src/identify.rs Co-authored-by: Max Inden <mail@max-inden.de> * Update protocols/identify/src/identify.rs Co-authored-by: Max Inden <mail@max-inden.de> * Update versions and changelogs. Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@ -38,7 +38,7 @@ use libp2p::{
|
||||
either::EitherTransport, muxing::StreamMuxerBox, transport, transport::upgrade::Version,
|
||||
},
|
||||
gossipsub::{self, Gossipsub, GossipsubConfigBuilder, GossipsubEvent, MessageAuthenticity},
|
||||
identify::{Identify, IdentifyEvent},
|
||||
identify::{Identify, IdentifyConfig, IdentifyEvent},
|
||||
identity,
|
||||
multiaddr::Protocol,
|
||||
noise,
|
||||
@ -245,11 +245,10 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
gossipsub_config,
|
||||
)
|
||||
.expect("Valid configuration"),
|
||||
identify: Identify::new(
|
||||
identify: Identify::new(IdentifyConfig::new(
|
||||
"/ipfs/0.1.0".into(),
|
||||
"rust-ipfs-example".into(),
|
||||
local_key.public(),
|
||||
),
|
||||
)),
|
||||
ping: Ping::new(PingConfig::new()),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user