Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
chore(docs): improve some comments (#13937)
Browse files Browse the repository at this point in the history
* chore(docs): improve some comments

* Update client/network/common/src/sync/message.rs

Co-authored-by: Koute <koute@users.noreply.github.com>

* Update client/rpc-api/src/chain/mod.rs

Co-authored-by: Koute <koute@users.noreply.github.com>

* Update client/rpc/src/chain/mod.rs

Co-authored-by: Koute <koute@users.noreply.github.com>

* Update client/rpc/src/chain/mod.rs

Co-authored-by: Koute <koute@users.noreply.github.com>

* Update frame/staking/src/pallet/impls.rs

Co-authored-by: Koute <koute@users.noreply.github.com>

---------

Co-authored-by: Koute <koute@users.noreply.github.com>
  • Loading branch information
yjhmelody and koute authored Apr 18, 2023
1 parent cb95482 commit 88e2c9e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/network/common/src/sync/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pub mod generic {
pub blocks: Vec<BlockData<Header, Hash, Extrinsic>>,
}

/// Announce a new complete relay chain block on the network.
/// Announce a new complete block on the network.
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct BlockAnnounce<H> {
/// New block header.
Expand Down
4 changes: 2 additions & 2 deletions client/network/common/src/sync/warp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct WarpProofRequest<B: BlockT> {

/// The different types of warp syncing.
pub enum WarpSyncParams<Block: BlockT> {
/// Standard warp sync for the relay chain
/// Standard warp sync for the chain.
WithProvider(Arc<dyn WarpSyncProvider<Block>>),
/// Skip downloading proofs and wait for a header of the state that should be downloaded.
///
Expand All @@ -48,7 +48,7 @@ pub enum VerificationResult<Block: BlockT> {
Complete(SetId, AuthorityList, Block::Header),
}

/// Warp sync backend. Handles retrieveing and verifying warp sync proofs.
/// Warp sync backend. Handles retrieving and verifying warp sync proofs.
pub trait WarpSyncProvider<Block: BlockT>: Send + Sync {
/// Generate proof starting at given block hash. The proof is accumulated until maximum proof
/// size is reached.
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-api/src/chain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub trait ChainApi<Number, Hash, Header, SignedBlock> {
#[method(name = "chain_getHeader", blocking)]
fn header(&self, hash: Option<Hash>) -> RpcResult<Option<Header>>;

/// Get header and body of a relay chain block.
/// Get header and body of a block.
#[method(name = "chain_getBlock", blocking)]
fn block(&self, hash: Option<Hash>) -> RpcResult<Option<SignedBlock>>;

Expand Down
4 changes: 2 additions & 2 deletions client/rpc/src/chain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ where
}
}

/// Get header of a relay chain block.
/// Get header of a block.
fn header(&self, hash: Option<Block::Hash>) -> Result<Option<Block::Header>, Error>;

/// Get header and body of a relay chain block.
/// Get header and body of a block.
fn block(&self, hash: Option<Block::Hash>) -> Result<Option<SignedBlock<Block>>, Error>;

/// Get hash of the n-th block in the canon chain.
Expand Down
2 changes: 1 addition & 1 deletion frame/staking/src/pallet/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ impl<T: Config> historical::SessionManager<T::AccountId, Exposure<T::AccountId,
}

/// Add reward points to block authors:
/// * 20 points to the block producer for producing a (non-uncle) block in the relay chain,
/// * 20 points to the block producer for producing a (non-uncle) block,
impl<T> pallet_authorship::EventHandler<T::AccountId, T::BlockNumber> for Pallet<T>
where
T: Config + pallet_authorship::Config + pallet_session::Config,
Expand Down

0 comments on commit 88e2c9e

Please sign in to comment.