Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert removal of outdated/private links
  • Loading branch information
gui1117 committed Mar 5, 2021
commit 26129ded5f833f51f0cc5bbe4d222426e945943f
2 changes: 1 addition & 1 deletion client/authority-discovery/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub enum Role {
///
/// 4. Put addresses and signature as a record with the authority id as a key on a Kademlia DHT.
///
/// When constructed with either [`Role::PublishAndDiscover`] or `Role::Publish` a [`Worker`] will
/// When constructed with either [`Role::PublishAndDiscover`] or [`Role::Publish`] a [`Worker`] will
///
/// 1. Retrieve the current and next set of authorities.
///
Expand Down
2 changes: 1 addition & 1 deletion client/network/src/block_request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

//! Helper for handling (i.e. answering) block requests from a remote peer via the
//! `crate::request_responses::RequestResponsesBehaviour`.
//! [`crate::request_responses::RequestResponsesBehaviour`].

use codec::{Encode, Decode};
use crate::chain::Client;
Expand Down
4 changes: 2 additions & 2 deletions client/network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub struct Params<B: BlockT, H: ExHashT> {

/// Request response configuration for the block request protocol.
///
/// [`RequestResponseConfig`] `name` is used to tag outgoing block requests with the correct
/// [`RequestResponseConfig`] [`name`] is used to tag outgoing block requests with the correct
/// protocol name. In addition all of [`RequestResponseConfig`] is used to handle incoming block
/// requests, if enabled.
///
Expand Down Expand Up @@ -555,7 +555,7 @@ pub enum TransportConfig {

/// If true, allow connecting to private IPv4 addresses (as defined in
/// [RFC1918](https://tools.ietf.org/html/rfc1918)). Irrelevant for addresses that have
/// been passed in `NetworkConfiguration::reserved_nodes` or
/// been passed in [`NetworkConfiguration::reserved_nodes`] or
/// [`NetworkConfiguration::boot_nodes`].
allow_private_ipv4: bool,

Expand Down
3 changes: 1 addition & 2 deletions client/network/src/light_client_requests/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//! Helper for incoming light client requests.
//!
//! Handle (i.e. answer) incoming light client requests from a remote peer received via
//! `crate::request_responses::RequestResponsesBehaviour` with
//! [`crate::light_client_requests::handler::LightClientRequestHandler`].
//! [`crate::request_responses::RequestResponsesBehaviour`] with [`LightClientRequestHandler`].

use codec::{self, Encode, Decode};
use crate::{
Expand Down
26 changes: 13 additions & 13 deletions client/network/src/light_client_requests/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

//! Helper for outgoing light client requests.
//!
//! Call `LightClientRequestSender::send_request` to send out light client requests. It will:
//! Call [`LightClientRequestSender::send_request`] to send out light client requests. It will:
//!
//! 1. Build the request.
//!
//! 2. Forward the request to `crate::request_responses::RequestResponsesBehaviour` via
//! `OutEvent::SendRequest`.
//! 2. Forward the request to [`crate::request_responses::RequestResponsesBehaviour`] via
//! [`OutEvent::SendRequest`].
//!
//! 3. Wait for the response and forward the response via the `oneshot::Sender` provided earlier
//! with `LightClientRequestSender::send_request`.
//! 3. Wait for the response and forward the response via the [`oneshot::Sender`] provided earlier
//! with [`LightClientRequestSender::send_request`].

use codec::{self, Encode, Decode};
use crate::{
Expand Down Expand Up @@ -546,13 +546,13 @@ impl<B: Block> Stream for LightClientRequestSender<B> {
/// Events returned by [`LightClientRequestSender`].
#[derive(Debug)]
pub enum OutEvent {
/// Emit a request to be send out on the network e.g. via `crate::request_responses`.
/// Emit a request to be send out on the network e.g. via [`crate::request_responses`].
SendRequest {
/// The remote peer to send the request to.
target: PeerId,
/// The encoded request.
request: Vec<u8>,
/// The `onehsot::Sender` channel to pass the response to.
/// The [`onehsot::Sender`] channel to pass the response to.
pending_response: oneshot::Sender<Result<Vec<u8>, RequestFailure>>,
/// The name of the protocol to use to send the request.
protocol_name: String,
Expand Down Expand Up @@ -643,42 +643,42 @@ pub enum Request<B: Block> {
Body {
/// Request.
request: RemoteBodyRequest<B::Header>,
/// `oneshot::Sender` to return response.
/// [`oneshot::Sender`] to return response.
sender: oneshot::Sender<Result<Vec<B::Extrinsic>, ClientError>>
},
/// Remote header request.
Header {
/// Request.
request: light::RemoteHeaderRequest<B::Header>,
/// `oneshot::Sender` to return response.
/// [`oneshot::Sender`] to return response.
sender: oneshot::Sender<Result<B::Header, ClientError>>
},
/// Remote read request.
Read {
/// Request.
request: light::RemoteReadRequest<B::Header>,
/// `oneshot::Sender` to return response.
/// [`oneshot::Sender`] to return response.
sender: oneshot::Sender<Result<HashMap<Vec<u8>, Option<Vec<u8>>>, ClientError>>
},
/// Remote read child request.
ReadChild {
/// Request.
request: light::RemoteReadChildRequest<B::Header>,
/// `oneshot::Sender` to return response.
/// [`oneshot::Sender`] to return response.
sender: oneshot::Sender<Result<HashMap<Vec<u8>, Option<Vec<u8>>>, ClientError>>
},
/// Remote call request.
Call {
/// Request.
request: light::RemoteCallRequest<B::Header>,
/// `oneshot::Sender` to return response.
/// [`oneshot::Sender`] to return response.
sender: oneshot::Sender<Result<Vec<u8>, ClientError>>
},
/// Remote changes request.
Changes {
/// Request.
request: light::RemoteChangesRequest<B::Header>,
/// `oneshot::Sender` to return response.
/// [`oneshot::Sender`] to return response.
sender: oneshot::Sender<Result<Vec<(NumberFor<B>, u32)>, ClientError>>
}
}
Expand Down
4 changes: 2 additions & 2 deletions client/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkService<B, H> {
/// > preventing the message from being delivered.
///
/// The protocol must have been registered with
/// `NetworkConfiguration::notifications_protocols`
/// [`NetworkConfiguration::notifications_protocols`](crate::config::NetworkConfiguration::notifications_protocols).
///
pub fn write_notification(&self, target: PeerId, protocol: Cow<'static, str>, message: Vec<u8>) {
// We clone the `NotificationsSink` in order to be able to unlock the network-wide
Expand Down Expand Up @@ -726,7 +726,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkService<B, H> {
/// in which case enqueued notifications will be lost.
///
/// The protocol must have been registered with
/// `NetworkConfiguration::notifications_protocols`
/// [`NetworkConfiguration::notifications_protocols`](crate::config::NetworkConfiguration::notifications_protocols).
///
/// # Usage
///
Expand Down