Fix some doc link (#10329)

* fix some doc link

* fmt
This commit is contained in:
Guillaume Thiolliere
2021-11-22 19:48:53 +09:00
committed by GitHub
parent cac9d85cb3
commit fcfb766366
25 changed files with 52 additions and 46 deletions
+5 -4
View File
@@ -21,7 +21,8 @@ use crate::{crypto::Signature, ValidatorSetId};
/// A commitment signed by GRANDPA validators as part of BEEFY protocol.
///
/// The commitment contains a [payload] extracted from the finalized block at height [block_number].
/// The commitment contains a [payload](Commitment::payload) extracted from the finalized block at
/// height [block_number](Commitment::block_number).
/// GRANDPA validators collect signatures on commitments and a stream of such signed commitments
/// (see [SignedCommitment]) forms the BEEFY protocol.
#[derive(Clone, Debug, PartialEq, Eq, codec::Encode, codec::Decode)]
@@ -33,7 +34,7 @@ pub struct Commitment<TBlockNumber, TPayload> {
/// validator set. The protocol does not enforce any particular format of this data,
/// nor how often it should be present in commitments, however the light client has to be
/// provided with full validator set whenever it performs the transition (i.e. importing first
/// block with [validator_set_id] incremented).
/// block with [validator_set_id](Commitment::validator_set_id) incremented).
pub payload: TPayload,
/// Finalized block number this commitment is for.
@@ -51,8 +52,8 @@ pub struct Commitment<TBlockNumber, TPayload> {
///
/// Validator set is changing once per epoch. The Light Client must be provided by details
/// about the validator set whenever it's importing first commitment with a new
/// `validator_set_id`. Validator set data MUST be verifiable, for instance using [payload]
/// information.
/// `validator_set_id`. Validator set data MUST be verifiable, for instance using
/// [payload](Commitment::payload) information.
pub validator_set_id: ValidatorSetId,
}
@@ -88,7 +88,7 @@ pub(crate) fn syn_err(message: &'static str) -> syn::Error {
/// ```
///
/// The given struct provides function to convert from/to `Assignment` as part of
/// [`sp_npos_elections::Solution`] trait:
/// `sp_npos_elections::Solution` trait:
///
/// - `fn from_assignment<..>(..)`
/// - `fn into_assignment<..>(..)`
@@ -201,7 +201,7 @@ impl<VoterIndex, TargetIndex, P: PerThing> IndexAssignment<VoterIndex, TargetInd
}
}
/// A type alias for [`IndexAssignment`] made from [`crate::Solution`].
/// A type alias for [`IndexAssignment`] made from [`crate::NposSolution`].
pub type IndexAssignmentOf<C> = IndexAssignment<
<C as crate::NposSolution>::VoterIndex,
<C as crate::NposSolution>::TargetIndex,
+1 -1
View File
@@ -89,7 +89,7 @@ pub type HostFuncType<T> = fn(&mut T, &[Value]) -> Result<ReturnValue, HostError
/// will be used by the guest module.
///
/// The memory can't be directly accessed by supervisor, but only
/// through designated functions [`get`](Memory::get) and [`set`](Memory::set).
/// through designated functions [`get`](SandboxMemory::get) and [`set`](SandboxMemory::set).
pub trait SandboxMemory: Sized + Clone {
/// Construct a new linear memory instance.
///