Tidy API to be more consistent with recent decisions

This commit is contained in:
Paul Hauner
2019-08-22 14:37:47 +10:00
parent a8daf46d5f
commit b912e26b79
6 changed files with 92 additions and 26 deletions

View File

@@ -33,7 +33,7 @@ pub struct Service {
//TODO: Make this private
pub swarm: Swarm<Libp2pStream, Libp2pBehaviour>,
/// This node's PeerId.
_local_peer_id: PeerId,
pub local_peer_id: PeerId,
/// The libp2p logger handle.
pub log: slog::Logger,
}
@@ -113,7 +113,7 @@ impl Service {
info!(log, "Subscribed to topics: {:?}", subscribed_topics);
Ok(Service {
_local_peer_id: local_peer_id,
local_peer_id,
swarm,
log,
})