mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 19:50:37 +00:00
Fix incorrect multiaddr, add logs
This commit is contained in:
parent
9dcf02e499
commit
b96bf6e3de
@ -30,9 +30,11 @@ pub fn listen(peer_id: PeerId,
|
||||
peer_store: Arc<MemoryPeerstore>,
|
||||
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::<Multiaddr>().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![]));
|
||||
let transport = libp2p_tcp_transport::TcpConfig::new(core.handle())
|
||||
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user