diff --git a/substrate/substrate/client/db/src/utils.rs b/substrate/substrate/client/db/src/utils.rs index 75c86ae06e15130e548809f9d7cfc329aafe62a8..ea5a8f2e77a27fc70da584d5c4948d78d8053d21 100644 --- a/substrate/substrate/client/db/src/utils.rs +++ b/substrate/substrate/client/db/src/utils.rs @@ -32,7 +32,7 @@ use DatabaseSettings; /// Number of columns in the db. Must be the same for both full && light dbs. /// Otherwise RocksDb will fail to open database && check its type. pub const NUM_COLUMNS: u32 = 7; -/// Meta column. Thes set of keys in the column is shared by full && light storages. +/// Meta column. The set of keys in the column is shared by full && light storages. pub const COLUMN_META: Option<u32> = Some(0); /// Keys of entries in COLUMN_META. diff --git a/substrate/substrate/network/src/service.rs b/substrate/substrate/network/src/service.rs index 58189bde19d65203b0f9b5240b24ddd0e2f6bd46..dfcff2a62c40334b314ffc6a3a8540cf38d3af1d 100644 --- a/substrate/substrate/network/src/service.rs +++ b/substrate/substrate/network/src/service.rs @@ -85,7 +85,7 @@ pub trait SyncProvider<B: BlockT>: Send + Sync { pub trait TransactionPool<B: BlockT>: Send + Sync { /// Get transactions from the pool that are ready to be propagated. fn transactions(&self) -> Vec<(B::Hash, B::Extrinsic)>; - /// Import a transction into the pool. + /// Import a transaction into the pool. fn import(&self, transaction: &B::Extrinsic) -> Option<B::Hash>; /// Notify the pool about transactions broadcast. fn on_broadcasted(&self, propagations: HashMap<B::Hash, Vec<String>>); diff --git a/substrate/substrate/primitives/src/hexdisplay.rs b/substrate/substrate/primitives/src/hexdisplay.rs index b1746727aed04495aab86f6db7a312d25aa02e86..01e74bd2521cbe1957c26a67a858213f123a7055 100644 --- a/substrate/substrate/primitives/src/hexdisplay.rs +++ b/substrate/substrate/primitives/src/hexdisplay.rs @@ -43,9 +43,9 @@ impl<'a> ::core::fmt::Display for HexDisplay<'a> { } } -/// Simple trait to transferm various types to `&[u8]` +/// Simple trait to transform various types to `&[u8]` pub trait AsBytesRef { - /// Transferm `self` into `&[u8]`. + /// Transform `self` into `&[u8]`. fn as_bytes_ref(&self) -> &[u8]; } diff --git a/substrate/substrate/primitives/src/sandbox.rs b/substrate/substrate/primitives/src/sandbox.rs index 9ee2c76381854979a321c18134a3b8d86501b124..2e3144b24ff25552657460e9b44066838f62c8f8 100644 --- a/substrate/substrate/primitives/src/sandbox.rs +++ b/substrate/substrate/primitives/src/sandbox.rs @@ -152,7 +152,7 @@ pub struct Entry { #[derive(Clone, PartialEq, Eq, Encode, Decode)] #[cfg_attr(feature = "std", derive(Debug))] pub struct EnvironmentDefinition { - /// Vector of all entries in the environment defintion. + /// Vector of all entries in the environment definition. pub entries: Vec<Entry>, } @@ -176,7 +176,7 @@ pub const ERR_MODULE: u32 = -1i32 as u32; /// For FFI purposes. pub const ERR_OUT_OF_BOUNDS: u32 = -2i32 as u32; -/// Execution error occured (typically trap). +/// Execution error occurred (typically trap). /// /// For FFI purposes. pub const ERR_EXECUTION: u32 = -3i32 as u32; diff --git a/substrate/substrate/runtime/contract/src/double_map.rs b/substrate/substrate/runtime/contract/src/double_map.rs index 7c4db02f35f3ba28fb3b05edd2086e5775bea9cb..505fe9e6a29a01906de05aa3e35728f90ddbae47 100644 --- a/substrate/substrate/runtime/contract/src/double_map.rs +++ b/substrate/substrate/runtime/contract/src/double_map.rs @@ -57,7 +57,7 @@ fn full_key<M: StorageDoubleMap + ?Sized>(k1: M::Key1, k2: M::Key2) -> Vec<u8> { /// The first part is a XX hash of a concatenation of the `PREFIX` and `Key1`. And the second part /// is a blake2 hash of a `Key2`. /// -/// Blake2 is used for `Key2` is because it will be used as a for a key for contract's storage and +/// Blake2 is used for `Key2` is because it will be used as a key for contract's storage and /// thus will be susceptible for a untrusted input. pub trait StorageDoubleMap { type Key1: Codec; diff --git a/substrate/substrate/state-db/src/lib.rs b/substrate/substrate/state-db/src/lib.rs index 00211f9ffcb19efc729337e90bc104a590a4efde..cb1e2f967e4331629c18b0c56281f4008b1ccdc5 100644 --- a/substrate/substrate/state-db/src/lib.rs +++ b/substrate/substrate/state-db/src/lib.rs @@ -72,7 +72,6 @@ pub trait HashDb { fn get(&self, key: &Self::Hash) -> Result<Option<DBValue>, Self::Error>; } -/// Error type. /// Error type. pub enum Error<E: fmt::Debug> { /// Database backend error.