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:
sufferpurrityxd
2023-09-12 13:09:27 +03:00
committed by GitHub
parent 581b1e42d0
commit b0c3da7f87
18 changed files with 18 additions and 23 deletions

View File

@ -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)