feat(node): print peer ID and addr on startup (#655)

* feat(node): print peer ID and addr on startup

* fix(node): print full PeerId on startup
This commit is contained in:
mempirate
2022-12-29 22:31:39 +01:00
committed by GitHub
parent 6efd50b25f
commit b5d8b6d4dd

View File

@ -98,10 +98,11 @@ impl Command {
let consensus = Arc::new(BeaconConsensus::new(self.chain.consensus.clone()));
let genesis_hash = init_genesis(db.clone(), self.chain.genesis.clone())?;
info!("Connecting to p2p");
let network =
config.network_config(db.clone(), chain_id, genesis_hash).start_network().await?;
info!(peer_id = ?network.peer_id(), local_addr = %network.local_addr(), "Started p2p networking");
// TODO: Are most of these Arcs unnecessary? For example, fetch client is completely
// cloneable on its own
// TODO: Remove magic numbers