From 2453e25fb830402c53373d8020b74171e853d579 Mon Sep 17 00:00:00 2001
From: klbrvik <124571753+klbrvik@users.noreply.github.com>
Date: Mon, 15 May 2023 23:45:19 +0200
Subject: [PATCH] expose transport, peer_info and discovery in sc-network
(#14132)
* expose transport, peer_info and discovery in sc-network
* fix fmt
* add missing module docs
---
substrate/client/network/src/lib.rs | 6 +++---
substrate/client/network/src/peer_info.rs | 3 +++
substrate/client/network/src/transport.rs | 2 ++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/substrate/client/network/src/lib.rs b/substrate/client/network/src/lib.rs
index 79023923e8..a66c187cac 100644
--- a/substrate/client/network/src/lib.rs
+++ b/substrate/client/network/src/lib.rs
@@ -243,17 +243,17 @@
//! More precise usage details are still being worked on and will likely change in the future.
mod behaviour;
-mod discovery;
-mod peer_info;
mod protocol;
mod service;
-mod transport;
pub mod config;
+pub mod discovery;
pub mod error;
pub mod event;
pub mod network_state;
+pub mod peer_info;
pub mod request_responses;
+pub mod transport;
pub mod types;
pub mod utils;
diff --git a/substrate/client/network/src/peer_info.rs b/substrate/client/network/src/peer_info.rs
index e4a5c5753a..aab3fc9487 100644
--- a/substrate/client/network/src/peer_info.rs
+++ b/substrate/client/network/src/peer_info.rs
@@ -16,6 +16,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
+//! [`PeerInfoBehaviour`] is implementation of `NetworkBehaviour` that holds information about peers
+//! in cache.
+
use crate::utils::interval;
use either::Either;
diff --git a/substrate/client/network/src/transport.rs b/substrate/client/network/src/transport.rs
index 9e63ce9887..4136b34fc0 100644
--- a/substrate/client/network/src/transport.rs
+++ b/substrate/client/network/src/transport.rs
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
+//! Transport that serves as a common ground for all connections.
+
use either::Either;
use libp2p::{
core::{