mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
typo fix in core (#2987)
This commit is contained in:
@@ -85,7 +85,7 @@ pub trait Backend<Block: BlockT>: HeaderBackend<Block> {
|
||||
|
||||
/// Returns hashes of all blocks that are leaves of the block tree.
|
||||
/// in other words, that have no children, are chain heads.
|
||||
/// Results must be ordered best (longest, heighest) chain first.
|
||||
/// Results must be ordered best (longest, highest) chain first.
|
||||
fn leaves(&self) -> Result<Vec<Block::Hash>>;
|
||||
|
||||
/// Return hashes of all blocks that are children of the block with `parent_hash`.
|
||||
|
||||
@@ -38,7 +38,7 @@ use hash_db::Hasher;
|
||||
use trie::MemoryDB;
|
||||
use consensus::well_known_cache_keys;
|
||||
|
||||
const IN_MEMORY_EXPECT_PROOF: &str = "InMemory state backend has Void error type and always suceeds; qed";
|
||||
const IN_MEMORY_EXPECT_PROOF: &str = "InMemory state backend has Void error type and always succeeds; qed";
|
||||
|
||||
/// Light client backend.
|
||||
pub struct Backend<S, F, H: Hasher> {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Private mplementation details of BABE digests.
|
||||
//! Private implementation details of BABE digests.
|
||||
|
||||
use primitives::sr25519::{Public, Signature};
|
||||
use babe_primitives::BABE_ENGINE_ID;
|
||||
|
||||
@@ -97,7 +97,7 @@ impl Config {
|
||||
/// state.
|
||||
pub fn get_or_compute<B: Block, C>(client: &C) -> CResult<Self>
|
||||
where
|
||||
C: AuxStore, C: ProvideRuntimeApi, C::Api: BabeApi<B>,
|
||||
C: AuxStore + ProvideRuntimeApi, C::Api: BabeApi<B>,
|
||||
{
|
||||
trace!(target: "babe", "Getting slot duration");
|
||||
match slots::SlotDuration::get_or_compute(client, |a, b| a.startup_data(b)).map(Self) {
|
||||
|
||||
@@ -341,11 +341,11 @@ impl SandboxInstance {
|
||||
}
|
||||
}
|
||||
|
||||
/// Error occured during instantiation of a sandboxed module.
|
||||
/// Error occurred during instantiation of a sandboxed module.
|
||||
pub enum InstantiationError {
|
||||
/// Something wrong with the environment definition. It either can't
|
||||
/// be decoded, have a reference to a non-existent or torn down memory instance.
|
||||
EnvironmentDefintionCorrupted,
|
||||
EnvironmentDefinitionCorrupted,
|
||||
/// Provided module isn't recognized as a valid webassembly binary.
|
||||
ModuleDecoding,
|
||||
/// Module is a well-formed webassembly binary but could not be instantiated. This could
|
||||
@@ -361,7 +361,7 @@ fn decode_environment_definition(
|
||||
memories: &[Option<MemoryRef>],
|
||||
) -> std::result::Result<(Imports, GuestToSupervisorFunctionMapping), InstantiationError> {
|
||||
let env_def = sandbox_primitives::EnvironmentDefinition::decode(&mut &raw_env_def[..])
|
||||
.ok_or_else(|| InstantiationError::EnvironmentDefintionCorrupted)?;
|
||||
.ok_or_else(|| InstantiationError::EnvironmentDefinitionCorrupted)?;
|
||||
|
||||
let mut func_map = HashMap::new();
|
||||
let mut memories_map = HashMap::new();
|
||||
@@ -381,8 +381,8 @@ fn decode_environment_definition(
|
||||
let memory_ref = memories
|
||||
.get(memory_idx as usize)
|
||||
.cloned()
|
||||
.ok_or_else(|| InstantiationError::EnvironmentDefintionCorrupted)?
|
||||
.ok_or_else(|| InstantiationError::EnvironmentDefintionCorrupted)?;
|
||||
.ok_or_else(|| InstantiationError::EnvironmentDefinitionCorrupted)?
|
||||
.ok_or_else(|| InstantiationError::EnvironmentDefinitionCorrupted)?;
|
||||
memories_map.insert((module, field), memory_ref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
//! Provides types and traits for creating and checking inherents.
|
||||
//!
|
||||
//! Each inherent is added to a produced block. Each runtime decides on which inherents its
|
||||
//! want to attach to its blocks. All data that is required for the runtime to create the inherents
|
||||
//! Each inherent is added to a produced block. Each runtime decides on which inherents it
|
||||
//! wants to attach to its blocks. All data that is required for the runtime to create the inherents
|
||||
//! is stored in the `InherentData`. This `InherentData` is constructed by the node and given to
|
||||
//! the runtime.
|
||||
//!
|
||||
@@ -124,8 +124,8 @@ impl InherentData {
|
||||
///
|
||||
/// It either returns okay for all checks, stores all occurred errors or just one fatal error.
|
||||
///
|
||||
/// When a fatal error occurres, all other errors are removed and the implementation needs to
|
||||
/// abbort checking inherents.
|
||||
/// When a fatal error occurs, all other errors are removed and the implementation needs to
|
||||
/// abort checking inherents.
|
||||
#[derive(Encode, Decode, Clone)]
|
||||
pub struct CheckInherentsResult {
|
||||
/// Did the check succeed?
|
||||
|
||||
@@ -353,7 +353,7 @@ impl Peerset {
|
||||
/// a corresponding `Accept` or `Reject`, except if we were already connected to this peer.
|
||||
///
|
||||
/// Note that this mechanism is orthogonal to `Connect`/`Drop`. Accepting an incoming
|
||||
/// connection implicitely means `Connect`, but incoming connections aren't cancelled by
|
||||
/// connection implicitly means `Connect`, but incoming connections aren't cancelled by
|
||||
/// `dropped`.
|
||||
///
|
||||
// Implementation note: because of concurrency issues, it is possible that we push a `Connect`
|
||||
|
||||
@@ -111,7 +111,7 @@ pub trait BuildStorage: Sized {
|
||||
) -> Result<(), String>;
|
||||
}
|
||||
|
||||
/// Somethig that can build the genesis storage of a module.
|
||||
/// Something that can build the genesis storage of a module.
|
||||
#[cfg(feature = "std")]
|
||||
pub trait BuildModuleGenesisStorage<T, I>: Sized {
|
||||
/// Create the module genesis storage into the given `storage` and `child_storage`.
|
||||
|
||||
@@ -96,7 +96,7 @@ impl Memory {
|
||||
///
|
||||
/// The memory allocated with initial number of pages specified by `initial`.
|
||||
/// Minimal possible value for `initial` is 0 and maximum possible is `65536`.
|
||||
/// (Since maximum addressible memory is 2<sup>32</sup> = 4GiB = 65536 * 64KiB).
|
||||
/// (Since maximum addressable memory is 2<sup>32</sup> = 4GiB = 65536 * 64KiB).
|
||||
///
|
||||
/// It is possible to limit maximum number of pages this memory instance can have by specifying
|
||||
/// `maximum`. If not specified, this memory instance would be able to allocate up to 4GiB.
|
||||
@@ -168,7 +168,6 @@ impl<T> EnvironmentDefinitionBuilder<T> {
|
||||
/// This instance can be used for invoking exported functions.
|
||||
pub struct Instance<T> {
|
||||
inner: imp::Instance<T>,
|
||||
|
||||
}
|
||||
|
||||
impl<T> Instance<T> {
|
||||
|
||||
@@ -33,7 +33,7 @@ mod ffi {
|
||||
/// # Safety
|
||||
///
|
||||
/// This function should be only called with a `HostFuncIndex` that was previously registered
|
||||
/// in the environment defintion. Typically this should only
|
||||
/// in the environment definition. Typically this should only
|
||||
/// be called with an argument received in `dispatch_thunk`.
|
||||
pub unsafe fn coerce_host_index_to_func<T>(idx: HostFuncIndex) -> HostFuncType<T> {
|
||||
// We need to ensure that sizes of a callable function pointer and host function index is
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Conrete externalities implementation.
|
||||
//! Concrete externalities implementation.
|
||||
|
||||
use std::{error, fmt, cmp::Ord};
|
||||
use log::warn;
|
||||
|
||||
@@ -62,7 +62,7 @@ pub use trie_backend::TrieBackend;
|
||||
|
||||
/// A wrapper around a child storage key.
|
||||
///
|
||||
/// This wrapper ensures that the child storage key is correct and properly used. It is
|
||||
/// This wrapper ensures that the child storage key is correct and properly used. It is
|
||||
/// impossible to create an instance of this struct without providing a correct `storage_key`.
|
||||
pub struct ChildStorageKey<'a, H: Hasher> {
|
||||
storage_key: Cow<'a, [u8]>,
|
||||
|
||||
@@ -350,7 +350,7 @@ impl<Hash: hash::Hash + Member + Serialize, Ex> ReadyTransactions<Hash, Ex> {
|
||||
/// we are about to replace is lower than the priority of the replacement transaction.
|
||||
/// We remove/replace old transactions in case they have lower priority.
|
||||
///
|
||||
/// In case replacement is succesful returns a list of removed transactions.
|
||||
/// In case replacement is successful returns a list of removed transactions.
|
||||
fn replace_previous(&mut self, tx: &Transaction<Hash, Ex>) -> error::Result<Vec<Arc<Transaction<Hash, Ex>>>> {
|
||||
let mut to_remove = {
|
||||
// check if we are replacing a transaction
|
||||
|
||||
Reference in New Issue
Block a user