fix typos (#291)

This commit is contained in:
Black3HDF
2019-06-16 15:50:17 +08:00
committed by Bastian Köcher
parent 62869f8a0a
commit cab12b60c1
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
//! and constructing a merkle root of the data. //! and constructing a merkle root of the data.
//! //!
//! Each of n validators stores their piece of data. We assume n=3f+k, k < 3. //! Each of n validators stores their piece of data. We assume n=3f+k, k < 3.
//! f is the maximum number of faulty vaildators in the system. //! f is the maximum number of faulty validators in the system.
//! The data is coded so any f+1 chunks can be used to reconstruct the full data. //! The data is coded so any f+1 chunks can be used to reconstruct the full data.
use parity_codec::{Encode, Decode}; use parity_codec::{Encode, Decode};
@@ -264,7 +264,7 @@ pub fn branches<'a>(chunks: Vec<&'a [u8]>) -> Branches<'a> {
} }
} }
/// Verify a markle branch, yielding the chunk hash meant to be present at that /// Verify a merkle branch, yielding the chunk hash meant to be present at that
/// index. /// index.
pub fn branch_hash(root: &H256, branch_nodes: &[Vec<u8>], index: usize) -> Result<H256, Error> { pub fn branch_hash(root: &H256, branch_nodes: &[Vec<u8>], index: usize) -> Result<H256, Error> {
let mut trie_storage: MemoryDB<Blake2Hasher> = MemoryDB::default(); let mut trie_storage: MemoryDB<Blake2Hasher> = MemoryDB::default();
+1 -1
View File
@@ -53,7 +53,7 @@ pub type AccountId = <Signature as Verify>::Signer;
/// never know... /// never know...
pub type AccountIndex = u32; pub type AccountIndex = u32;
/// Indentifier for a chain. 32-bit should be plenty. /// Identifier for a chain. 32-bit should be plenty.
pub type ChainId = u32; pub type ChainId = u32;
/// A hash of some data used by the relay chain. /// A hash of some data used by the relay chain.
+1 -1
View File
@@ -191,7 +191,7 @@ mod tests {
use substrate_primitives::{H256, Blake2Hasher}; use substrate_primitives::{H256, Blake2Hasher};
use parity_codec::{Decode, Encode}; use parity_codec::{Decode, Encode};
// The testing primitives are very useful for avoiding having to work with signatures // The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried. // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sr_primitives::{ use sr_primitives::{
BuildStorage, traits::{BlakeTwo256, IdentityLookup}, testing::{Digest, DigestItem, Header} BuildStorage, traits::{BlakeTwo256, IdentityLookup}, testing::{Digest, DigestItem, Header}
}; };
+1 -1
View File
@@ -93,7 +93,7 @@ pub struct SignedStatement<C, D, V, S> {
/// three possible combinations (unordered) /// three possible combinations (unordered)
#[derive(PartialEq, Eq, Debug, Clone)] #[derive(PartialEq, Eq, Debug, Clone)]
pub enum ValidityDoubleVote<C, D, S> { pub enum ValidityDoubleVote<C, D, S> {
/// Implicit vote by issuing and explicity voting validity. /// Implicit vote by issuing and explicitly voting validity.
IssuedAndValidity((C, S), (D, S)), IssuedAndValidity((C, S), (D, S)),
/// Implicit vote by issuing and explicitly voting invalidity /// Implicit vote by issuing and explicitly voting invalidity
IssuedAndInvalidity((C, S), (D, S)), IssuedAndInvalidity((C, S), (D, S)),