Fix various spelling errors (#4940)

* meaningfull -> meaningful

* initialise -> initialize

* tokans -> tokens

* incentivise -> incentivize

* lenght -> length

* incentivisation -> incentivization

* doesnt't -> doesn't

* overwriten -> overwritten

* lifecycle -> life cycle

* lifecycle -> life cycle

* usefull -> useful

* noone -> no one

* spaming -> spamming

* defered -> deferred

* hieght -> height

* sumation -> summation

* ingore -> ignore

* registed -> registered

* Auxialary -> Auxiliary

* loggin -> logging

* independance -> independence

* trailling -> trailing

* responsability -> responsibility

* trunkated -> truncated

* Weither -> Whether

* informations -> information

* Runtume -> Runtime

* choosen -> chosen

* delcataion -> declaration

* Unchekced -> Unchecked

* defintion -> definition

* scrach -> scratch

* imput -> input

* transfered -> transferred

* endownment -> endowment

* Determinator -> Determiner

* relevent -> relevant

* emited -> emitted

* acocunt -> account

* proprotional -> proportional

* instantiaion -> instantiation

* commited -> committed

* tombstonedead -> tombstone

* uwnrap -> unwrap

* acount -> account

* specialised -> specialized

* existant -> existent

* requried -> required

* Anull -> Annul

* AUTHORITES -> AUTHORITIES

* underyling -> underlying

* recognisable -> recognizable

* Capitalise -> Capitalize

* reportfor -> report for

* hearbeat -> heartbeat

* onlineness -> being online

* creater -> creator

* Bytearray -> Byte array

* Despoit -> Deposit

* substratced -> subtracted

* Curent -> Current

* imbalanes -> imbalances

* countfown -> countdown

* inexisting -> inexistent

* additionaly -> additionally

* substracted -> subtracted

* auxilary -> auxiliary

* parital -> partial

* in't -> isn't

* compatability -> compatibility

* infomation -> information

* etected -> detected

* extrinsiscs -> extrinsics

* reprensentation -> representation

* coonfiguration -> configuration

* primtives -> primitives

* miscelanious -> miscellaneous

* VERISON -> VERSION

* endcoded -> encoded

* Genrates -> Generates

* miliseconds -> milliseconds

* occured -> occurred

* trully -> truely

* truely -> truly

* conjuction -> conjunction

* encouters -> encounters

* customised -> customized

* deterministicly -> deterministically

* finalisation -> finalization

* pluggable -> plugable

* wakeup -> wake-up

* interemdiate -> intermediate

* intepreting -> interpreting

* finalzied -> finalized

* throgh -> through

* extinsic -> extrinsic

* convient -> convenient

* allocater -> allocator

* propagateable -> propagatable

* succesfuly -> successfully

* finalising -> finalizing

* publically -> publicly

* phrasee -> phrase

* substration -> substractions

* substractions -> subtractions

* neccessarily -> necessarily

* Inlucde -> Include

* unefficient -> inefficient

* thay -> they

* funtion -> function

* datastructures -> data structures

* infromation -> information

* propagatable -> propagable

* ecountered -> encountered

* recognise -> recognize

* intergration -> integration

* lastet -> latest

* datatypes -> data types

* datatype -> data type

* Strongarming -> Strong Arming

* avaible -> available

* Commiting -> Committing

* Retreiving -> Retrieving

* shoud -> should

* canonicaliziation -> canonicalization

* comitted -> committed

* clonable -> cloneable

* Uknown -> Unknown

* reponse -> response

* arbitary -> arbitrary

* Capapbilities -> Capabilities

* responsbile -> responsible

* initialisation -> initialization

* cames -> came

* intemediate -> intermediate

* reqeust -> request

* intance -> instance

* explcitly -> explicitly

* neighor -> neighbor

* reolving -> resolving

* untill -> until

* Validte -> Validate

* deserailize -> deserialize

* literaly -> literally

* preceeding -> preceding

* abpve -> above

* chcecked -> checked

* numbet -> number

* Unknow -> Unknown

* halfs -> halves

* gossup -> gossip

* givent -> given

* immediatelly -> immediately

* slicable -> sliceable

* conensus -> consensus

* Mimicks -> Mimics

* acccept -> accept

* serialise -> serialize

* exstrinsics -> extrinsics

* panicks -> panics

* maintaince -> maintenance

* repeatidely -> repeatedly

* anecstor -> ancestor

* becasue -> because

* processer -> processor

* Prunning -> Pruning

* insterested -> interested

* unuseful -> not useful

* yeided -> yielded

* descendfing -> descending

* corresponts -> corresponds

* survivew -> survive

* keps -> keeps

* ligh -> light

* prerequisities -> prerequisites

* positiion -> position

* depedency -> dependency

* extrinisic -> extrinsic

* atomicaly -> atomically

* staticly -> statically

* resul -> result

* timestamb -> timestamp

* Utilites -> Utilities

* ammount -> amount

* pocess -> process

* exteral -> external

* Update client/finality-grandpa/src/tests.rs

* Update primitives/io/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update primitives/blockchain/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/support/src/weights.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update bin/node/cli/tests/common.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update client/api/src/execution_extensions.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update client/cli/src/params.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update client/executor/common/src/sandbox.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update client/api/src/execution_extensions.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update client/finality-grandpa/src/communication/mod.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update client/state-db/src/pruning.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update frame/contracts/src/tests.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update client/api/src/execution_extensions.rs

* bump impl

* timestamb -> timestamp

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
Shawn Tabrizi
2020-02-17 15:07:24 +01:00
committed by GitHub
parent 86ab0cb4d9
commit c7a14db792
169 changed files with 281 additions and 282 deletions
@@ -37,7 +37,7 @@
//! allocation size is capped, therefore the number of orders and thus the linked lists is as well
//! limited.
//!
//! When the allocater serves an allocation request it first checks the linked list for the respective
//! When the allocator serves an allocation request it first checks the linked list for the respective
//! order. If it doesn't have any free chunks, the allocator requests memory from the bump allocator.
//! In any case the order is stored in the header of the allocation.
//!
@@ -48,7 +48,7 @@ use crate::Error;
use sp_std::{convert::{TryFrom, TryInto}, ops::{Range, Index, IndexMut}};
use sp_wasm_interface::{Pointer, WordSize};
/// The minimal alignment guaranteed by this allocator. The alignment of 8 is choosen because it is
/// The minimal alignment guaranteed by this allocator. The alignment of 8 is chosen because it is
/// the alignment guaranteed by wasm32.
const ALIGNMENT: u32 = 8;
@@ -22,7 +22,7 @@
//! Once a panic is found, it can be debugged with
//! `cargo hfuzz run-debug biguint hfuzz_workspace/biguint/*.fuzz`.
//!
//! # More infomation
//! # More information
//! More information about `honggfuzz` can be found
//! [here](https://docs.rs/honggfuzz/).
@@ -22,7 +22,7 @@
//! Once a panic is found, it can be debugged with
//! `cargo hfuzz run-debug rational128 hfuzz_workspace/rational128/*.fuzz`.
//!
//! # More infomation
//! # More information
//! More information about `honggfuzz` can be found
//! [here](https://docs.rs/honggfuzz/).
@@ -26,7 +26,7 @@ use sp_inherents::{InherentData, CheckInherentsResult};
///
/// These definitions are taken from the 2c58e30246a029b53d51e5b24c31974ac539ee8b git revision.
#[deprecated(note = "These definitions here are only for compatibility reasons")]
pub mod compatability_v3 {
pub mod compatibility_v3 {
use sp_runtime::{DispatchOutcome, transaction_validity};
use codec::{Encode, Decode};
@@ -51,7 +51,7 @@ sp_api::decl_runtime_apis! {
#[changed_in(4)]
#[allow(deprecated)]
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic)
-> self::compatability_v3::ApplyResult;
-> self::compatibility_v3::ApplyResult;
/// Apply the given extrinsic.
///
+5 -5
View File
@@ -20,7 +20,7 @@ use std::{self, error, result};
use sp_state_machine;
use sp_runtime::transaction_validity::TransactionValidityError;
#[allow(deprecated)]
use sp_block_builder::compatability_v3;
use sp_block_builder::compatibility_v3;
use sp_consensus;
use derive_more::{Display, From};
use codec::Error as CodecError;
@@ -37,7 +37,7 @@ pub enum ApplyExtrinsicFailed {
/// unappliable onto the current block.
#[display(fmt = "Extrinsic is not valid: {:?}", _0)]
Validity(TransactionValidityError),
/// This is used for miscelanious errors that can be represented by string and not handleable.
/// This is used for miscellaneous errors that can be represented by string and not handleable.
///
/// This will become obsolete with complete migration to v4 APIs.
#[display(fmt = "Extrinsic failed: {:?}", _0)]
@@ -151,9 +151,9 @@ impl<'a> From<&'a str> for Error {
}
#[allow(deprecated)]
impl From<compatability_v3::ApplyError> for ApplyExtrinsicFailed {
fn from(e: compatability_v3::ApplyError) -> Self {
use self::compatability_v3::ApplyError::*;
impl From<compatibility_v3::ApplyError> for ApplyExtrinsicFailed {
fn from(e: compatibility_v3::ApplyError) -> Self {
use self::compatibility_v3::ApplyError::*;
match e {
Validity(tx_validity) => Self::Validity(tx_validity),
e => Self::Msg(format!("Apply extrinsic failed: {:?}", e)),
+1 -1
View File
@@ -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/>.
//! Substrate blockchain traits and primtives
//! Substrate blockchain traits and primitives.
mod backend;
mod header_metadata;
@@ -229,7 +229,7 @@ impl<Block: BlockT, Transaction> BlockImportParams<Block, Transaction> {
}
}
/// Take interemdiate by given key, and remove it from the processing list.
/// Take intermediate by given key, and remove it from the processing list.
pub fn take_intermediate<T: 'static>(&mut self, key: &[u8]) -> Result<Box<T>, Error> {
let (k, v) = self.intermediates.remove_entry(key).ok_or(Error::NoIntermediate)?;
@@ -37,7 +37,7 @@ pub enum Error {
/// Intermediate is of wrong type.
#[display(fmt="Invalid intermediate.")]
InvalidIntermediate,
/// Unable to schedule wakeup.
/// Unable to schedule wake-up.
#[display(fmt="Timer error: {}", _0)]
FaultyTimer(std::io::Error),
/// Error while working with inherent data.
@@ -29,7 +29,7 @@ use crate::import_queue::{
};
/// Interface to a basic block import queue that is importing blocks sequentially in a separate
/// task, with pluggable verification.
/// task, with plugable verification.
pub struct BasicQueue<B: BlockT, Transaction> {
/// Channel to send messages to the background task.
sender: mpsc::UnboundedSender<ToWorkerMsg<B>>,
@@ -22,16 +22,16 @@ use sp_runtime::traits::{Block as BlockT, NumberFor};
/// if multiple forks are present for an opaque definition of "best" in the
/// specific chain build.
///
/// The Strategy can be customised for the two use cases of authoring new blocks
/// The Strategy can be customized for the two use cases of authoring new blocks
/// upon the best chain or which fork to finalise. Unless implemented differently
/// by default finalisation methods fall back to use authoring, so as a minimum
/// by default finalization methods fall back to use authoring, so as a minimum
/// `_authoring`-functions must be implemented.
///
/// Any particular user must make explicit, however, whether they intend to finalise
/// or author through the using the right function call, as these might differ in
/// some implementations.
///
/// Non-deterministicly finalising chains may only use the `_authoring` functions.
/// Non-deterministically finalizing chains may only use the `_authoring` functions.
pub trait SelectChain<Block: BlockT>: Sync + Send + Clone {
/// Get all leaves of the chain: block hashes that have no children currently.
+1 -1
View File
@@ -882,7 +882,7 @@ pub trait CryptoType {
/// An identifier for a type of cryptographic key.
///
/// To avoid clashes with other modules when distributing your module publically, register your
/// To avoid clashes with other modules when distributing your module publicly, register your
/// `KeyTypeId` on the list here by making a PR.
///
/// Values whose first character is `_` are reserved for private use and won't conflict with any
+1 -1
View File
@@ -433,7 +433,7 @@ impl TraitPair for Pair {
/// Make a new key pair from secret seed material.
///
/// You should never need to use this; generate(), generate_with_phrasee
/// You should never need to use this; generate(), generate_with_phrase
fn from_seed(seed: &Seed) -> Pair {
Self::from_seed_slice(&seed[..]).expect("seed has valid length; qed")
}
+1 -1
View File
@@ -201,7 +201,7 @@ impl<R: PartialEq + codec::Decode> PartialEq for NativeOrEncoded<R> {
}
/// A value that is never in a native representation.
/// This is type is useful in conjuction with `NativeOrEncoded`.
/// This is type is useful in conjunction with `NativeOrEncoded`.
#[cfg(feature = "std")]
#[derive(PartialEq)]
pub enum NeverNativeValue {}
@@ -135,7 +135,7 @@ pub enum HttpRequestStatus {
/// Note the deadline is controlled by the calling part, it not necessarily
/// means that the request has timed out.
DeadlineReached,
/// An error has occured during the request, for example a timeout or the
/// An error has occurred during the request, for example a timeout or the
/// remote has closed our socket.
///
/// The request is now considered destroyed. To retry the request you need
@@ -226,7 +226,7 @@ impl Duration {
}
impl Timestamp {
/// Creates new `Timestamp` given unix timestamp in miliseconds.
/// Creates new `Timestamp` given unix timestamp in milliseconds.
pub fn from_unix_millis(millis: u64) -> Self {
Timestamp(millis)
}
@@ -335,7 +335,7 @@ pub trait Externalities: Send {
/// Returns a random seed.
///
/// This is a trully random non deterministic seed generated by host environment.
/// This is a truly random non deterministic seed generated by host environment.
/// Obviously fine in the off-chain worker context.
fn random_seed(&mut self) -> [u8; 32];
+1 -1
View File
@@ -245,7 +245,7 @@ mod tests {
let public = store.write()
.ed25519_generate_new(ED25519, None)
.expect("Genrates key");
.expect("Generates key");
let store_key_pair = store.read()
.ed25519_key_pair(ED25519, &public)
@@ -196,7 +196,7 @@ pub trait Externalities: ExtensionStore {
) -> Vec<u8>;
/// Get the change trie root of the current storage overlay at a block with given parent.
/// `parent` is expects a SCALE endcoded hash.
/// `parent` is expects a SCALE encoded hash.
///
/// The hash is defined by the `Block`.
///
@@ -164,7 +164,7 @@ pub const AUTHORITIES_CALL: &str = "grandpa_authorities";
/// The current version of the stored AuthorityList type. The encoding version MUST be updated any
/// time the AuthorityList type changes.
const AUTHORITIES_VERISON: u8 = 1;
const AUTHORITIES_VERSION: u8 = 1;
/// An AuthorityList that is encoded with a version specifier. The encoding version is updated any
/// time the AuthorityList type changes. This ensures that encodings of different versions of an
@@ -193,18 +193,18 @@ impl<'a> Into<AuthorityList> for VersionedAuthorityList<'a> {
impl<'a> Encode for VersionedAuthorityList<'a> {
fn size_hint(&self) -> usize {
(AUTHORITIES_VERISON, self.0.as_ref()).size_hint()
(AUTHORITIES_VERSION, self.0.as_ref()).size_hint()
}
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R {
(AUTHORITIES_VERISON, self.0.as_ref()).using_encoded(f)
(AUTHORITIES_VERSION, self.0.as_ref()).using_encoded(f)
}
}
impl<'a> Decode for VersionedAuthorityList<'a> {
fn decode<I: Input>(value: &mut I) -> Result<Self, codec::Error> {
let (version, authorities): (u8, AuthorityList) = Decode::decode(value)?;
if version != AUTHORITIES_VERISON {
if version != AUTHORITIES_VERSION {
return Err("unknown Grandpa authorities version".into());
}
Ok(authorities.into())
+1 -1
View File
@@ -312,7 +312,7 @@ impl InherentDataProviders {
/// Converts a given encoded error into a `String`.
///
/// Useful if the implementation encouters an error for an identifier it does not know.
/// Useful if the implementation encounters an error for an identifier it does not know.
pub fn error_to_string(&self, identifier: &InherentIdentifier, error: &[u8]) -> String {
let res = self.providers.read().iter().filter_map(|p|
if p.inherent_identifier() == identifier {
+1 -1
View File
@@ -594,7 +594,7 @@ pub trait Offchain {
/// Returns a random seed.
///
/// This is a trully random non deterministic seed generated by host environment.
/// This is a truly random, non-deterministic seed generated by host environment.
/// Obviously fine in the off-chain worker context.
fn random_seed(&mut self) -> [u8; 32] {
self.extension::<OffchainExt>()
+1 -1
View File
@@ -23,7 +23,7 @@ use serde::{Serialize, Deserialize};
/// For some RPCs it's convenient to call them with either
/// a single value or a whole list of values to get a proper response.
/// In theory you could do a batch query, but it's:
/// 1. Less convient in client libraries
/// 1. Less convenient in client libraries
/// 2. If the response value is small, the protocol overhead might be dominant.
///
/// Also it's nice to be able to maintain backward compatibility for methods that
@@ -25,7 +25,7 @@ use sp_std::{vec, vec::Vec, mem, convert::TryFrom};
use sp_core::{sr25519::Public, wasm_export_functions};
// Inlucde the WASM binary
// Include the WASM binary
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
+1 -1
View File
@@ -65,7 +65,7 @@ impl<'a> PiecewiseLinear<'a> {
next.0.deconstruct().saturating_sub(prev.0.deconstruct()),
);
// If both substration are same sign then result is positive
// If both subtractions are same sign then result is positive
if (n > prev.0 * d.clone()) == (next.1.deconstruct() > prev.1.deconstruct()) {
(prev.1 * d).saturating_add(delta_y)
// Otherwise result is negative
@@ -365,7 +365,7 @@ impl<'a, Hash> DigestItemRef<'a, Hash> {
}
/// Try to match this digest item to the given opaque item identifier; if it matches, then
/// try to cast to the given datatype; if that works, return it.
/// try to cast to the given data type; if that works, return it.
pub fn try_to<T: Decode>(&self, id: OpaqueDigestItemId) -> Option<T> {
self.try_as_raw(id).and_then(|mut x| Decode::decode(&mut x).ok())
}
+2 -2
View File
@@ -214,7 +214,7 @@ impl Default for MultiSigner {
}
}
/// NOTE: This implementations is required by `SimpleAddressDeterminator`,
/// NOTE: This implementations is required by `SimpleAddressDeterminer`,
/// we convert the hash into some AccountId, it's fine to use any scheme.
impl<T: Into<H256>> crypto::UncheckedFrom<T> for MultiSigner {
fn unchecked_from(x: T) -> Self {
@@ -458,7 +458,7 @@ pub type DispatchOutcome = Result<(), DispatchError>;
///
/// Examples of reasons preventing inclusion in a block:
/// - More block weight is required to process the extrinsic than is left in the block being built.
/// This doesn't neccessarily mean that the extrinsic is invalid, since it can still be
/// This doesn't necessarily mean that the extrinsic is invalid, since it can still be
/// included in the next block if it has enough spare weight available.
/// - The sender doesn't have enough funds to pay the transaction inclusion fee. Including such
/// a transaction in the block doesn't make sense.
@@ -257,7 +257,7 @@ pub enum Error {
DeadlineReached,
/// Request had timed out.
IoError,
/// Unknown error has been ecountered.
/// Unknown error has been encountered.
Unknown,
}
@@ -61,11 +61,11 @@ impl<'a> StorageValueRef<'a> {
.map(|val| T::decode(&mut &*val).ok())
}
/// Retrieve & decode the value and set it to a new one atomicaly.
/// Retrieve & decode the value and set it to a new one atomically.
///
/// Function `f` should return a new value that we should attempt to write to storage.
/// This function returns:
/// 1. `Ok(Ok(T))` in case the value has been succesfuly set.
/// 1. `Ok(Ok(T))` in case the value has been successfully set.
/// 2. `Ok(Err(T))` in case the value was returned, but it couldn't have been set.
/// 3. `Err(_)` in case `f` returns an error.
pub fn mutate<T, E, F>(&self, f: F) -> Result<Result<T, T>, E> where
+1 -1
View File
@@ -955,7 +955,7 @@ pub trait ValidateUnsigned {
fn validate_unsigned(call: &Self::Call) -> TransactionValidity;
}
/// Opaque datatype that may be destructured into a series of raw byte slices (which represent
/// Opaque data type that may be destructured into a series of raw byte slices (which represent
/// individual keys).
pub trait OpaqueKeys: Clone {
/// Types bound to this opaque keys that provide the key type ids returned.
+1 -1
View File
@@ -193,7 +193,7 @@ impl<T> Instance<T> {
/// - This module doesn't have an exported function with the given name,
/// - If types of the arguments passed to the function doesn't match function signature
/// then trap occurs (as if the exported function was called via call_indirect),
/// - Trap occured at the execution time.
/// - Trap occurred at the execution time.
pub fn invoke(
&mut self,
name: &str,
@@ -209,7 +209,7 @@ pub trait Backend<H: Hasher>: std::fmt::Debug {
/// Query backend usage statistics (i/o, memory)
///
/// Not all implementations are expected to be able to do this. In the
/// case when thay don't, empty statistics is returned.
/// case when they don't, empty statistics is returned.
fn usage_info(&self) -> UsageInfo {
UsageInfo::empty()
}
@@ -16,7 +16,7 @@
//! Changes trie related structures and functions.
//!
//! Changes trie is a trie built of { storage key => extrinsiscs } pairs
//! Changes trie is a trie built of { storage key => extrinsics } pairs
//! at the end of each block. For every changed storage key it contains
//! a pair, mapping key to the set of extrinsics where it has been changed.
//!
@@ -130,7 +130,7 @@ pub struct AnchorBlockId<Hash: std::fmt::Debug, Number: BlockNumber> {
pub struct State<'a, H, Number> {
/// Configuration that is active at given block.
pub config: Configuration,
/// Configuration activation block number. Zero if it is the first coonfiguration on the chain,
/// Configuration activation block number. Zero if it is the first configuration on the chain,
/// or number of the block that have emit NewConfiguration signal (thus activating configuration
/// starting from the **next** block).
pub zero: Number,
@@ -377,7 +377,7 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where
/// Note: changes to code will be in place if this call is made again. For running partial
/// blocks (e.g. a transaction at a time), ensure a different method is used.
///
/// Returns the result of the executed function either in native reprensentation `R` or
/// Returns the result of the executed function either in native representation `R` or
/// in SCALE encoded representation.
pub fn execute_using_consensus_failure_handler<Handler, R, NC>(
&mut self,
@@ -55,7 +55,7 @@ pub struct OverlayedChanges {
pub(crate) prospective: OverlayedChangeSet,
/// Committed changes.
pub(crate) committed: OverlayedChangeSet,
/// True if extrinsiscs stats must be collected.
/// True if extrinsics stats must be collected.
pub(crate) collect_extrinsics: bool,
}
@@ -65,7 +65,7 @@ pub struct OverlayedChanges {
pub struct OverlayedValue {
/// Current value. None if value has been deleted.
pub value: Option<StorageValue>,
/// The set of extinsic indices where the values has been changed.
/// The set of extrinsic indices where the values has been changed.
/// Is filled only if runtime has announced changes trie support.
pub extrinsics: Option<BTreeSet<u32>>,
}
@@ -371,7 +371,7 @@ impl OverlayedChanges {
}
if let Some((child_committed, _child_info)) = self.committed.children.get(storage_key) {
// Then do the same with keys from commited changes.
// Then do the same with keys from committed changes.
// NOTE that we are making changes in the prospective change set.
for key in child_committed.keys() {
if key.starts_with(prefix) {
@@ -436,7 +436,7 @@ mod tests {
}
#[test]
fn passes_throgh_backend_calls() {
fn passes_through_backend_calls() {
let trie_backend = test_trie();
let proving_backend = test_proving(&trie_backend);
assert_eq!(trie_backend.storage(b"key").unwrap(), proving_backend.storage(b"key").unwrap());
+1 -1
View File
@@ -35,7 +35,7 @@ pub use core::ops;
pub use core::ptr;
pub use core::result;
pub use core::slice;
// Allow intepreting vectors of bytes as strings, but not constructing them.
// Allow interpreting vectors of bytes as strings, but not constructing them.
pub use core::str;
// We are trying to avoid certain things here, such as `core::string`
// (if you need `String` you are probably doing something wrong, since
@@ -52,7 +52,7 @@ pub enum Error {
/// Transaction entering the pool.
new: Priority
},
/// Deps cycle etected and we couldn't import transaction.
/// Deps cycle detected and we couldn't import transaction.
#[display(fmt="Cycle Detected")]
CycleDetected,
/// Transaction was dropped immediately after it got inserted.
@@ -169,7 +169,7 @@ pub trait InPoolTransaction {
/// Get tags that transaction provides.
fn provides(&self) -> &[TransactionTag];
/// Return a flag indicating if the transaction should be propagated to other peers.
fn is_propagateable(&self) -> bool;
fn is_propagable(&self) -> bool;
}
/// Transaction pool interface.
@@ -249,7 +249,7 @@ pub enum ChainEvent<B: BlockT> {
/// List of retracted blocks ordered by block number.
retracted: Vec<B::Hash>,
},
/// An existing block has been finalzied.
/// An existing block has been finalized.
Finalized {
/// Hash of just finalized block
hash: B::Hash,
+1 -1
View File
@@ -69,7 +69,7 @@ impl Decode for NodeHeader {
}
/// Returns an iterator over encoded bytes for node header and size.
/// Size encoding allows unlimited, length unefficient, representation, but
/// Size encoding allows unlimited, length inefficient, representation, but
/// is bounded to 16 bit maximum value to avoid possible DOS.
pub(crate) fn size_and_prefix_iterator(size: usize, prefix: u8) -> impl Iterator<Item = u8> {
let size = sp_std::cmp::min(trie_constants::NIBBLE_SIZE_BOUND, size);