mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Add network feature to eth2 (#8558)
This reverts some of the changes from #8524 by adding back the typed network endpoints with an optional `network` feature. Without the `network` feature, these endpoints (and associated dependencies) will not be built. This means the `enr`, `multiaddr` and `libp2p-identity` dependencies have returned but are now optional Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -2140,12 +2140,9 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
let discovery_addresses = enr.multiaddr_p2p_udp();
|
||||
Ok(api_types::GenericResponse::from(api_types::IdentityData {
|
||||
peer_id: network_globals.local_peer_id().to_base58(),
|
||||
enr: enr.to_base64(),
|
||||
p2p_addresses: p2p_addresses.iter().map(|a| a.to_string()).collect(),
|
||||
discovery_addresses: discovery_addresses
|
||||
.iter()
|
||||
.map(|a| a.to_string())
|
||||
.collect(),
|
||||
enr,
|
||||
p2p_addresses,
|
||||
discovery_addresses,
|
||||
metadata: utils::from_meta_data::<T::EthSpec>(
|
||||
&network_globals.local_metadata,
|
||||
&chain.spec,
|
||||
|
||||
Reference in New Issue
Block a user