mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 02:01:35 +00:00
feat(swarm): log local peer id on swarm creation
Closes https://github.com/libp2p/rust-libp2p/issues/4394. Pull-Request: #4439.
This commit is contained in:
@ -31,9 +31,9 @@ use std::error::Error;
|
||||
|
||||
#[async_std::main]
|
||||
async fn main() -> Result<(), Box<dyn Error>> {
|
||||
env_logger::init();
|
||||
let local_key = identity::Keypair::generate_ed25519();
|
||||
let local_peer_id = PeerId::from(local_key.public());
|
||||
println!("Local peer id: {local_peer_id:?}");
|
||||
|
||||
let transport = tcp::async_io::Transport::default()
|
||||
.upgrade(Version::V1Lazy)
|
||||
|
Reference in New Issue
Block a user