mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Tidy API to be more consistent with recent decisions
This commit is contained in:
@@ -75,6 +75,11 @@ impl<T: BeaconChainTypes + 'static> Service<T> {
|
||||
.clone()
|
||||
}
|
||||
|
||||
/// Returns the local libp2p PeerID.
|
||||
pub fn local_peer_id(&self) -> PeerId {
|
||||
self.libp2p_service.lock().local_peer_id.clone()
|
||||
}
|
||||
|
||||
/// Returns the list of `Multiaddr` that the underlying libp2p instance is listening on.
|
||||
pub fn listen_multiaddrs(&self) -> Vec<Multiaddr> {
|
||||
Swarm::listeners(&self.libp2p_service.lock().swarm)
|
||||
|
||||
Reference in New Issue
Block a user