Rewrap all comments to 100 line width (#9490)

* reformat everything again

* manual formatting

* last manual fix

* Fix build
This commit is contained in:
Kian Paimani
2021-08-11 16:56:55 +02:00
committed by GitHub
parent 8180c58700
commit abd08e29ce
258 changed files with 1776 additions and 1447 deletions
+14 -7
View File
@@ -365,14 +365,16 @@ pub trait StorageProvider<Block: BlockT, B: Backend<Block>> {
key: &StorageKey,
) -> sp_blockchain::Result<Option<Block::Hash>>;
/// Given a `BlockId` and a key prefix, return the matching child storage keys and values in that block.
/// Given a `BlockId` and a key prefix, return the matching child storage keys and values in
/// that block.
fn storage_pairs(
&self,
id: &BlockId<Block>,
key_prefix: &StorageKey,
) -> sp_blockchain::Result<Vec<(StorageKey, StorageData)>>;
/// Given a `BlockId` and a key prefix, return a `KeyIterator` iterates matching storage keys in that block.
/// Given a `BlockId` and a key prefix, return a `KeyIterator` iterates matching storage keys in
/// that block.
fn storage_keys_iter<'a>(
&self,
id: &BlockId<Block>,
@@ -380,7 +382,8 @@ pub trait StorageProvider<Block: BlockT, B: Backend<Block>> {
start_key: Option<&StorageKey>,
) -> sp_blockchain::Result<KeyIterator<'a, B::State, Block>>;
/// Given a `BlockId`, a key and a child storage key, return the value under the key in that block.
/// Given a `BlockId`, a key and a child storage key, return the value under the key in that
/// block.
fn child_storage(
&self,
id: &BlockId<Block>,
@@ -388,7 +391,8 @@ pub trait StorageProvider<Block: BlockT, B: Backend<Block>> {
key: &StorageKey,
) -> sp_blockchain::Result<Option<StorageData>>;
/// Given a `BlockId`, a key prefix, and a child storage key, return the matching child storage keys.
/// Given a `BlockId`, a key prefix, and a child storage key, return the matching child storage
/// keys.
fn child_storage_keys(
&self,
id: &BlockId<Block>,
@@ -406,7 +410,8 @@ pub trait StorageProvider<Block: BlockT, B: Backend<Block>> {
start_key: Option<&StorageKey>,
) -> sp_blockchain::Result<KeyIterator<'a, B::State, Block>>;
/// Given a `BlockId`, a key and a child storage key, return the hash under the key in that block.
/// Given a `BlockId`, a key and a child storage key, return the hash under the key in that
/// block.
fn child_storage_hash(
&self,
id: &BlockId<Block>,
@@ -569,7 +574,8 @@ pub trait PrunableStateChangesTrieStorage<Block: BlockT>:
) -> sp_blockchain::Result<ChangesTrieConfigurationRange<NumberFor<Block>, Block::Hash>>;
/// Get end block (inclusive) of oldest pruned max-level (or skewed) digest trie blocks range.
/// It is guaranteed that we have no any changes tries before (and including) this block.
/// It is guaranteed that all existing changes tries after this block are not yet pruned (if created).
/// It is guaranteed that all existing changes tries after this block are not yet pruned (if
/// created).
fn oldest_pruned_digest_range_end(&self) -> NumberFor<Block>;
}
@@ -616,7 +622,8 @@ pub trait ProvideChtRoots<Block: BlockT> {
block: NumberFor<Block>,
) -> sp_blockchain::Result<Option<Block::Hash>>;
/// Get changes trie CHT root for given block. Returns None if the block is not a part of any CHT.
/// Get changes trie CHT root for given block. Returns None if the block is not a part of any
/// CHT.
fn changes_trie_cht_root(
&self,
cht_size: NumberFor<Block>,
+2 -1
View File
@@ -47,7 +47,8 @@ pub fn size<N: From<u32>>() -> N {
SIZE.into()
}
/// Returns Some(cht_number) if CHT is need to be built when the block with given number is canonized.
/// Returns Some(cht_number) if CHT is need to be built when the block with given number is
/// canonized.
pub fn is_build_required<N>(cht_size: N, block_num: N) -> Option<N>
where
N: Clone + AtLeast32Bit,
+2 -1
View File
@@ -125,7 +125,8 @@ where
displaced
}
/// Note a block height finalized, displacing all leaves with number less than the finalized block's.
/// Note a block height finalized, displacing all leaves with number less than the finalized
/// block's.
///
/// Although it would be more technically correct to also prune out leaves at the
/// same number as the finalized block, but with different hashes, the current behavior
+7 -6
View File
@@ -55,11 +55,11 @@ pub trait ProofProvider<Block: BlockT> {
id: &BlockId<Block>,
) -> sp_blockchain::Result<(Block::Header, StorageProof)>;
/// Get proof for computation of (block, extrinsic) pairs where key has been changed at given blocks range.
/// `min` is the hash of the first block, which changes trie root is known to the requester - when we're using
/// changes tries from ascendants of this block, we should provide proofs for changes tries roots
/// `max` is the hash of the last block known to the requester - we can't use changes tries from descendants
/// of this block.
/// Get proof for computation of (block, extrinsic) pairs where key has been changed at given
/// blocks range. `min` is the hash of the first block, which changes trie root is known to the
/// requester - when we're using changes tries from ascendants of this block, we should provide
/// proofs for changes tries roots `max` is the hash of the last block known to the requester -
/// we can't use changes tries from descendants of this block.
/// Works only for runtimes that are supporting changes tries.
fn key_changes_proof(
&self,
@@ -72,7 +72,8 @@ pub trait ProofProvider<Block: BlockT> {
) -> sp_blockchain::Result<ChangesProof<Block::Header>>;
/// Given a `BlockId` iterate over all storage values starting at `start_key` exclusively,
/// building proofs until size limit is reached. Returns combined proof and the number of collected keys.
/// building proofs until size limit is reached. Returns combined proof and the number of
/// collected keys.
fn read_proof_collection(
&self,
id: &BlockId<Block>,