typo fix in core (#2987)

This commit is contained in:
kaichao
2019-07-02 01:33:38 +08:00
committed by Bastian Köcher
parent bd7566ef5e
commit 3e2c77aa21
17 changed files with 24 additions and 25 deletions
@@ -29,7 +29,7 @@ use crate::changes_trie::{AnchorBlockId, Configuration, Storage, BlockNumber};
/// Prepare input pairs for building a changes trie of given block.
///
/// Returns Err if storage error has occured OR if storage haven't returned
/// Returns Err if storage error has occurred OR if storage haven't returned
/// required data.
/// Returns Ok(None) data required to prepare input pairs is not collected
/// or storage is not provided.
@@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
//! Structures and functions to return blocks whose changes are to be included
//! in given block' changes trie.
//! in given block's changes trie.
use crate::changes_trie::{Configuration, BlockNumber};
@@ -98,7 +98,7 @@ pub fn key_changes_proof<S: Storage<H, Number>, H: Hasher, Number: BlockNumber>(
Ok(iter.extract_proof())
}
/// Check key changes proog and return changes of the key at given blocks range.
/// Check key changes proof and return changes of the key at given blocks range.
/// `max` is the number of best known block.
/// Changes are returned in descending order (i.e. last block comes first).
pub fn key_changes_proof_check<S: RootsStorage<H, Number>, H: Hasher, Number: BlockNumber>(
@@ -145,7 +145,7 @@ fn pruning_range<Number: BlockNumber>(
/// blocks. So we can only prune blocks that are earlier than B - max_digest_interval.
/// The pruning_delay stands for number of max_digest_interval-s that we want to keep:
/// 0 or 1: means that only last changes trie is guaranteed to exists;
/// 2: the last chnages trie + previous changes trie
/// 2: the last changes trie + previous changes trie
/// ...
fn max_digest_intervals_to_keep<Number: BlockNumber>(
min_blocks_to_keep: Number,