mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
Reduce cargo doc warnings (#8947)
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -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.
|
||||
///
|
||||
|
||||
@@ -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<A, B, C, PR> {
|
||||
spawn_handle: Box<dyn SpawnNamed>,
|
||||
/// The client instance.
|
||||
@@ -62,7 +62,7 @@ pub struct ProposerFactory<A, B, C, PR> {
|
||||
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<TelemetryHandle>,
|
||||
@@ -134,7 +134,7 @@ impl<A, B, C, PR> ProposerFactory<A, B, C, PR> {
|
||||
/// 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;
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ impl<T> Drop for SharedDataLockedUpgradable<T> {
|
||||
/// 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.
|
||||
///
|
||||
|
||||
@@ -428,10 +428,10 @@ impl<B: BlockT, T: SimpleSlotWorker<B> + Send> SlotWorker<B, <T::Proposer as Pro
|
||||
|
||||
/// Slot specific extension that the inherent data provider needs to implement.
|
||||
pub trait InherentDataProviderExt {
|
||||
/// The current timestamp that will be found in the [`InherentData`].
|
||||
/// The current timestamp that will be found in the [`InherentData`](`sp_inherents::InherentData`).
|
||||
fn timestamp(&self) -> 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
///
|
||||
@@ -171,7 +171,7 @@ pub enum TransactionImport {
|
||||
None,
|
||||
}
|
||||
|
||||
/// Fuure resolving to transaction import result.
|
||||
/// Future resolving to transaction import result.
|
||||
pub type TransactionImportFuture = Pin<Box<dyn Future<Output=TransactionImport> + 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
|
||||
|
||||
@@ -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<u8>,
|
||||
/// The [`onehsot::Sender`] channel to pass the response to.
|
||||
/// The [`oneshot::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,
|
||||
|
||||
@@ -925,7 +925,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkService<B, H> {
|
||||
}
|
||||
}
|
||||
|
||||
/// 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.
|
||||
|
||||
@@ -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
|
||||
/// <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.
|
||||
|
||||
@@ -419,7 +419,7 @@ fn check_compact_attr(input: ParseStream) -> Result<bool> {
|
||||
}
|
||||
}
|
||||
|
||||
/// #[compact] pub struct CompactName::<VoterIndex = u32, TargetIndex = u32, Accuracy = u32>()
|
||||
/// `#[compact] pub struct CompactName::<VoterIndex = u32, TargetIndex = u32, Accuracy = u32>()`
|
||||
impl Parse for SolutionDef {
|
||||
fn parse(input: ParseStream) -> syn::Result<Self> {
|
||||
// optional #[compact]
|
||||
|
||||
Reference in New Issue
Block a user