diff --git a/client/authority-discovery/src/worker.rs b/client/authority-discovery/src/worker.rs index 3b76215dc24c5..bb9207e4e7ea6 100644 --- a/client/authority-discovery/src/worker.rs +++ b/client/authority-discovery/src/worker.rs @@ -86,7 +86,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::Discover`] a [`Worker`] will /// /// 1. Retrieve the current and next set of authorities. /// diff --git a/client/basic-authorship/src/basic_authorship.rs b/client/basic-authorship/src/basic_authorship.rs index c8277d3b5d32c..36e649fb8ed5c 100644 --- a/client/basic-authorship/src/basic_authorship.rs +++ b/client/basic-authorship/src/basic_authorship.rs @@ -44,14 +44,14 @@ use sc_proposer_metrics::MetricsLink as PrometheusMetrics; /// Default block size limit in bytes used by [`Proposer`]. /// -/// Can be overwritten by [`ProposerFactory::set_block_size_limit`]. +/// Can be overwritten by [`ProposerFactory::set_default_block_size_limit`]. /// /// Be aware that there is also an upper packet size on what the networking code /// will accept. If the block doesn't fit in such a package, it can not be /// transferred to other nodes. pub const DEFAULT_BLOCK_SIZE_LIMIT: usize = 4 * 1024 * 1024 + 512; -/// Proposer factory. +/// [`Proposer`] factory. pub struct ProposerFactory { spawn_handle: Box, /// The client instance. @@ -62,7 +62,7 @@ pub struct ProposerFactory { metrics: PrometheusMetrics, /// The default block size limit. /// - /// If no `block_size_limit` is passed to [`Proposer::propose`], this block size limit will be + /// If no `block_size_limit` is passed to [`sp_consensus::Proposer::propose`], this block size limit will be /// used. default_block_size_limit: usize, telemetry: Option, @@ -134,7 +134,7 @@ impl ProposerFactory { /// The default value for the block size limit is: /// [`DEFAULT_BLOCK_SIZE_LIMIT`]. /// - /// If there is no block size limit passed to [`Proposer::propose`], this value will be used. + /// If there is no block size limit passed to [`sp_consensus::Proposer::propose`], this value will be used. pub fn set_default_block_size_limit(&mut self, limit: usize) { self.default_block_size_limit = limit; } diff --git a/client/consensus/common/src/shared_data.rs b/client/consensus/common/src/shared_data.rs index d90fc6273e056..8132a42a4b929 100644 --- a/client/consensus/common/src/shared_data.rs +++ b/client/consensus/common/src/shared_data.rs @@ -54,8 +54,8 @@ impl Drop for SharedDataLockedUpgradable { /// Created by [`SharedData::shared_data_locked`]. /// /// As long as this object isn't dropped, the shared data is held in a mutex guard and the shared -/// data is tagged as locked. Access to the shared data is provided through [`Deref`] and -/// [`DerefMut`]. The trick is to use [`Self::release_mutex`] to release the mutex, but still keep +/// data is tagged as locked. Access to the shared data is provided through [`Deref`](std::ops::Deref) and +/// [`DerefMut`](std::ops::DerefMut). The trick is to use [`Self::release_mutex`] to release the mutex, but still keep /// the shared data locked. This means every other thread trying to access the shared data in this /// time will need to wait until this lock is freed. /// diff --git a/client/consensus/slots/src/lib.rs b/client/consensus/slots/src/lib.rs index 2ea5e101c3adc..cc879f769e47f 100644 --- a/client/consensus/slots/src/lib.rs +++ b/client/consensus/slots/src/lib.rs @@ -428,10 +428,10 @@ impl + Send> SlotWorker Timestamp; - /// The current slot that will be found in the [`InherentData`]. + /// The current slot that will be found in the [`InherentData`](`sp_inherents::InherentData`). fn slot(&self) -> Slot; } diff --git a/client/network/src/config.rs b/client/network/src/config.rs index a742d8c95274d..4942d1b0fb878 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -105,7 +105,7 @@ pub struct Params { /// 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. /// @@ -171,7 +171,7 @@ pub enum TransactionImport { None, } -/// Fuure resolving to transaction import result. +/// Future resolving to transaction import result. pub type TransactionImportFuture = Pin + Send>>; /// Transaction pool interface @@ -599,8 +599,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 - /// [`NetworkConfiguration::boot_nodes`]. + /// been passed in [`NetworkConfiguration::boot_nodes`]. allow_private_ipv4: bool, /// Optional external implementation of a libp2p transport. Used in WASM contexts where we diff --git a/client/network/src/light_client_requests/sender.rs b/client/network/src/light_client_requests/sender.rs index bf832ea13aedf..7cb224344a9ac 100644 --- a/client/network/src/light_client_requests/sender.rs +++ b/client/network/src/light_client_requests/sender.rs @@ -25,7 +25,7 @@ //! 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 +//! 3. Wait for the response and forward the response via the [`futures::channel::oneshot::Sender`] provided earlier //! with [`LightClientRequestSender::send_request`]. use codec::{self, Encode, Decode}; @@ -552,7 +552,7 @@ pub enum OutEvent { target: PeerId, /// The encoded request. request: Vec, - /// The [`onehsot::Sender`] channel to pass the response to. + /// The [`oneshot::Sender`] channel to pass the response to. pending_response: oneshot::Sender, RequestFailure>>, /// The name of the protocol to use to send the request. protocol_name: String, diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 5dc550254fcd1..6351f03a393ed 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -925,7 +925,7 @@ impl NetworkService { } } - /// You may call this when new transactons are imported by the transaction pool. + /// You may call this when new transactions are imported by the transaction pool. /// /// All transactions will be fetched from the `TransactionPool` that was passed at /// initialization as part of the configuration and propagated to peers. diff --git a/frame/contracts/rpc/src/lib.rs b/frame/contracts/rpc/src/lib.rs index dd9ec164a984b..1250d3cb285e7 100644 --- a/frame/contracts/rpc/src/lib.rs +++ b/frame/contracts/rpc/src/lib.rs @@ -50,7 +50,7 @@ pub type Weight = u64; /// /// As 1 gas is equal to 1 weight we base this on the conducted benchmarks which /// determined runtime weights: -/// https://github.com/paritytech/substrate/pull/5446 +/// const GAS_PER_SECOND: Weight = 1_000_000_000_000; /// The maximum amount of weight that the call and instantiate rpcs are allowed to consume. diff --git a/primitives/npos-elections/compact/src/lib.rs b/primitives/npos-elections/compact/src/lib.rs index e49518cc25cc7..e8cde87744539 100644 --- a/primitives/npos-elections/compact/src/lib.rs +++ b/primitives/npos-elections/compact/src/lib.rs @@ -419,7 +419,7 @@ fn check_compact_attr(input: ParseStream) -> Result { } } -/// #[compact] pub struct CompactName::() +/// `#[compact] pub struct CompactName::()` impl Parse for SolutionDef { fn parse(input: ParseStream) -> syn::Result { // optional #[compact]