From b96bf6e3de3dfe38ed2633cb6252d90599a96f72 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sat, 28 Jul 2018 18:36:44 +1000 Subject: [PATCH] Fix incorrect multiaddr, add logs --- src/p2p/floodsub.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p2p/floodsub.rs b/src/p2p/floodsub.rs index b03b9acc9..8ed788aba 100644 --- a/src/p2p/floodsub.rs +++ b/src/p2p/floodsub.rs @@ -30,8 +30,10 @@ pub fn listen(peer_id: PeerId, peer_store: Arc, log: &Logger) { - let listen_multiaddr: Multiaddr = "/ip4/0.0.0.0/tcp/10101/ws" + let listen_multiaddr: Multiaddr = "/ip4/0.0.0.0/tcp/0" .parse::().expect("Failed to parse listen multiaddr."); + + info!(log, "Local PeerId: {:?}", peer_id); let core = tokio_core::reactor::Core::new().expect("tokio failure."); let listened_addrs = Arc::new(RwLock::new(vec![])); @@ -102,6 +104,8 @@ pub fn listen(peer_id: PeerId, let actual_addr = swarm_ctrl .listen_on(listen_multiaddr) .expect("Failed to listen on multiaddr"); + + info!(log, "Listening on: {:?}", actual_addr); } #[derive(Clone)]