diff --git a/substrate/README.adoc b/substrate/README.adoc index 71c512b820..038ccb1a64 100644 --- a/substrate/README.adoc +++ b/substrate/README.adoc @@ -229,8 +229,8 @@ Then build the code: [source, shell] ---- -./scripts/build.sh # Builds the WebAssembly binaries -cargo build # Builds all native code +./scripts/build.sh # Builds the WebAssembly binaries +cargo build # Builds all native code ---- You can run all the tests if you like: diff --git a/substrate/core/cli/src/params.rs b/substrate/core/cli/src/params.rs index 42d98bf7ed..4de8559bc6 100644 --- a/substrate/core/cli/src/params.rs +++ b/substrate/core/cli/src/params.rs @@ -20,7 +20,7 @@ use std::path::PathBuf; use structopt::{StructOpt, clap::{arg_enum, _clap_count_exprs, App, AppSettings, SubCommand, Arg}}; use client; -/// Auxialary macro to implement `GetLogFilter` for all types that have the `shared_params` field. +/// Auxiliary macro to implement `GetLogFilter` for all types that have the `shared_params` field. macro_rules! impl_get_log_filter { ( $type:ident ) => { impl $crate::GetLogFilter for $type { @@ -564,7 +564,7 @@ pub struct ImportBlocksCmd { impl_get_log_filter!(ImportBlocksCmd); -/// The `revert` command used revert the chain to a previos state. +/// The `revert` command used revert the chain to a previous state. #[derive(Debug, StructOpt, Clone)] pub struct RevertCmd { /// Number of blocks to revert. diff --git a/substrate/core/client/db/src/cache/list_cache.rs b/substrate/core/client/db/src/cache/list_cache.rs index 67e09b580d..fcce71a538 100644 --- a/substrate/core/client/db/src/cache/list_cache.rs +++ b/substrate/core/client/db/src/cache/list_cache.rs @@ -436,7 +436,7 @@ impl Fork { } } - /// Try to append NEW block to the fork. This method willonly 'work' (return true) when block + /// Try to append NEW block to the fork. This method will only 'work' (return true) when block /// is actually appended to the fork AND the best known block of the fork is known (i.e. some /// block has been already appended to this fork after last restart). pub fn try_append(&self, parent: &ComplexBlockId) -> bool { @@ -932,7 +932,7 @@ pub mod tests { assert!(tx.removed_entries().is_empty()); assert_eq!(*tx.updated_meta(), Some(Metadata { finalized: Some(correct_id(2)), unfinalized: vec![correct_id(3)] })); - // when inserting finalized entry AND there are no previous finalzed entries + // when inserting finalized entry AND there are no previous finalized entries let cache = ListCache::new(DummyStorage::new(), 1024, correct_id(2)); let mut tx = DummyTransaction::new(); assert_eq!(cache.on_block_insert(&mut tx, correct_id(2), correct_id(3), Some(3), true).unwrap(), @@ -1031,7 +1031,7 @@ pub mod tests { // when new block is appended to unfinalized fork cache.on_transaction_commit(CommitOperation::AppendNewBlock(0, correct_id(6))); assert_eq!(cache.unfinalized[0].best_block, Some(correct_id(6))); - // when new entry is appnded to unfinalized fork + // when new entry is appended to unfinalized fork cache.on_transaction_commit(CommitOperation::AppendNewEntry(0, Entry { valid_from: correct_id(7), value: Some(7) })); assert_eq!(cache.unfinalized[0].best_block, Some(correct_id(7))); assert_eq!(cache.unfinalized[0].head, Entry { valid_from: correct_id(7), value: Some(7) }); diff --git a/substrate/core/client/db/src/lib.rs b/substrate/core/client/db/src/lib.rs index e730c0888d..d17337a665 100644 --- a/substrate/core/client/db/src/lib.rs +++ b/substrate/core/client/db/src/lib.rs @@ -764,7 +764,7 @@ impl> Backend { Ok((*hash, number, false, true)) } - // performs forced canonicaliziation with a delay after importning a non-finalized block. + // performs forced canonicaliziation with a delay after importing a non-finalized block. fn force_delayed_canonicalize( &self, transaction: &mut DBTransaction, diff --git a/substrate/core/client/src/light/blockchain.rs b/substrate/core/client/src/light/blockchain.rs index b43247034f..c38d50303e 100644 --- a/substrate/core/client/src/light/blockchain.rs +++ b/substrate/core/client/src/light/blockchain.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Light client blockchin backend. Only stores headers and justifications of recent +//! Light client blockchain backend. Only stores headers and justifications of recent //! blocks. CHT roots are stored for headers of ancient blocks. use std::{sync::{Weak, Arc}, collections::HashMap}; diff --git a/substrate/core/client/src/light/call_executor.rs b/substrate/core/client/src/light/call_executor.rs index 6fcd2f4052..cbe179b605 100644 --- a/substrate/core/client/src/light/call_executor.rs +++ b/substrate/core/client/src/light/call_executor.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Light client call exector. Executes methods on remote full nodes, fetching +//! Light client call executor. Executes methods on remote full nodes, fetching //! execution proof and checking it locally. use std::{collections::HashSet, sync::Arc, panic::UnwindSafe, result, marker::PhantomData}; @@ -406,7 +406,7 @@ pub fn prove_execution( /// Check remote contextual execution proof using given backend. /// /// Method is executed using passed header as environment' current block. -/// Proof shoul include both environment preparation proof and method execution proof. +/// Proof should include both environment preparation proof and method execution proof. pub fn check_execution_proof( executor: &E, request: &RemoteCallRequest
, diff --git a/substrate/core/consensus/common/src/import_queue.rs b/substrate/core/consensus/common/src/import_queue.rs index d1c5c69d02..160538966f 100644 --- a/substrate/core/consensus/common/src/import_queue.rs +++ b/substrate/core/consensus/common/src/import_queue.rs @@ -589,7 +589,7 @@ pub fn import_single_block>( match import_error(import_handle.check_block(hash, parent))? { BlockImportResult::ImportedUnknown { .. } => (), - r @ _ => return Ok(r), // Any other successfull result means that the block is already imported. + r => return Ok(r), // Any other successful result means that the block is already imported. } let (import_block, new_authorities) = verifier.verify(block_origin, header, justification, block.body) diff --git a/substrate/core/consensus/rhd/src/lib.rs b/substrate/core/consensus/rhd/src/lib.rs index cbdf95d987..0afe10ffce 100644 --- a/substrate/core/consensus/rhd/src/lib.rs +++ b/substrate/core/consensus/rhd/src/lib.rs @@ -613,7 +613,7 @@ impl BftService .map_or(true, |x| self.can_build_on_inner(header, x)) } - /// Get a reference to the underyling client. + /// Get a reference to the underlying client. pub fn client(&self) -> &I { &*self.client } fn can_build_on_inner(&self, header: &B::Header, live: &(B::Header, AgreementHandle)) -> bool { diff --git a/substrate/core/consensus/slots/src/lib.rs b/substrate/core/consensus/slots/src/lib.rs index 258e528f15..5f00990d0b 100644 --- a/substrate/core/consensus/slots/src/lib.rs +++ b/substrate/core/consensus/slots/src/lib.rs @@ -41,7 +41,7 @@ use codec::{Encode, Decode}; /// A worker that should be invoked at every new slot. pub trait SlotWorker { - /// The type fo the future that will be returned when a new slot is + /// The type of the future that will be returned when a new slot is /// triggered. type OnSlot: IntoFuture; diff --git a/substrate/core/finality-grandpa/src/communication/mod.rs b/substrate/core/finality-grandpa/src/communication/mod.rs index ec7ed330ac..395f820254 100644 --- a/substrate/core/finality-grandpa/src/communication/mod.rs +++ b/substrate/core/finality-grandpa/src/communication/mod.rs @@ -704,7 +704,7 @@ impl> Sink for CommitsOut { let topic = global_topic::(self.set_id.0); // the gossip validator needs to be made aware of the best commit-height we know of - // before gosipping + // before gossiping self.gossip_validator.note_commit_finalized( commit.target_number, |to, neighbor| self.network.send_message( diff --git a/substrate/core/keyring/src/ed25519.rs b/substrate/core/keyring/src/ed25519.rs index 96ade6167c..9c303b62bc 100644 --- a/substrate/core/keyring/src/ed25519.rs +++ b/substrate/core/keyring/src/ed25519.rs @@ -79,7 +79,7 @@ impl Keyring { .expect("static values are known good; qed") } - /// Returns an interator over all test accounts. + /// Returns an iterator over all test accounts. pub fn iter() -> impl Iterator { ::iter() } diff --git a/substrate/core/network-libp2p/src/custom_proto/handler.rs b/substrate/core/network-libp2p/src/custom_proto/handler.rs index 7c0ec61344..6794a9b12c 100644 --- a/substrate/core/network-libp2p/src/custom_proto/handler.rs +++ b/substrate/core/network-libp2p/src/custom_proto/handler.rs @@ -194,7 +194,7 @@ enum ProtocolState { }, /// We sometimes temporarily switch to this state during processing. If we are in this state - /// at the beginning of a method, that means something bad happend in the source code. + /// at the beginning of a method, that means something bad happened in the source code. Poisoned, } diff --git a/substrate/core/network/src/test/mod.rs b/substrate/core/network/src/test/mod.rs index 46636fa11f..5b375984b4 100644 --- a/substrate/core/network/src/test/mod.rs +++ b/substrate/core/network/src/test/mod.rs @@ -58,7 +58,7 @@ pub use test_client::TestClient; pub struct PassThroughVerifier(pub bool); #[cfg(any(test, feature = "test-helpers"))] -/// This Verifiyer accepts all data as valid +/// This `Verifier` accepts all data as valid. impl Verifier for PassThroughVerifier { fn verify( &self, diff --git a/substrate/core/sr-primitives/src/generic/mod.rs b/substrate/core/sr-primitives/src/generic/mod.rs index 47ce3cb251..b0f86f959f 100644 --- a/substrate/core/sr-primitives/src/generic/mod.rs +++ b/substrate/core/sr-primitives/src/generic/mod.rs @@ -52,7 +52,7 @@ fn encode_with_vec_prefix)>(encoder: F) -> Vec v.resize(reserve, 0); encoder(&mut v); - // need to prefix with the total length to ensure it's binary comptible with + // need to prefix with the total length to ensure it's binary compatible with // Vec. let mut length: Vec<()> = Vec::new(); length.resize(v.len() - reserve, ()); diff --git a/substrate/core/sr-primitives/src/generic/tests.rs b/substrate/core/sr-primitives/src/generic/tests.rs index 91fc8f3faf..b42c05ea4c 100644 --- a/substrate/core/sr-primitives/src/generic/tests.rs +++ b/substrate/core/sr-primitives/src/generic/tests.rs @@ -27,7 +27,7 @@ fn system_digest_item_encoding() { assert_eq!(encoded, vec![ // type = DigestItemType::AuthoritiesChange 1, - // number of items in athorities set + // number of items in authorities set 12, // authorities 10, 0, 0, 0, diff --git a/substrate/core/sr-primitives/src/transaction_validity.rs b/substrate/core/sr-primitives/src/transaction_validity.rs index 7cf3aa1d6d..d927bd74e4 100644 --- a/substrate/core/sr-primitives/src/transaction_validity.rs +++ b/substrate/core/sr-primitives/src/transaction_validity.rs @@ -49,7 +49,7 @@ pub enum TransactionValidity { requires: Vec, /// Provided tags /// - /// A list of tags this transaction provides. Successfuly importing the transaction + /// A list of tags this transaction provides. Successfully importing the transaction /// will enable other transactions that depend on (require) those tags to be included as well. /// Provided and requried tags allow Substrate to build a dependency graph of transactions /// and import them in the right (linear) order. diff --git a/substrate/core/state-machine/src/changes_trie/changes_iterator.rs b/substrate/core/state-machine/src/changes_trie/changes_iterator.rs index ad70117984..8d56e6c8ff 100644 --- a/substrate/core/state-machine/src/changes_trie/changes_iterator.rs +++ b/substrate/core/state-machine/src/changes_trie/changes_iterator.rs @@ -228,7 +228,7 @@ impl<'a, RS: 'a + RootsStorage, S: Storage, H: Hasher> DrilldownIteratorEs .ok_or_else(|| format!("Changes trie root for block {} is not found", block))?; // only return extrinsics for blocks before self.max - // most of blocks will be filtered out beore pushing to `self.blocks` + // most of blocks will be filtered out before pushing to `self.blocks` // here we just throwing away changes at digest blocks we're processing debug_assert!(block >= self.begin, "We shall not touch digests earlier than a range' begin"); if block <= self.end.number { diff --git a/substrate/core/state-machine/src/changes_trie/mod.rs b/substrate/core/state-machine/src/changes_trie/mod.rs index c29131cc0c..bce0609bbb 100644 --- a/substrate/core/state-machine/src/changes_trie/mod.rs +++ b/substrate/core/state-machine/src/changes_trie/mod.rs @@ -33,7 +33,7 @@ //! to the set of lower-level digest blocks. //! //! Changes trie only contains the top level storage changes. Sub-level changes -//! are propogated through its storage root on the top level storage. +//! are propagated through its storage root on the top level storage. mod build; mod build_iterator; diff --git a/substrate/core/state-machine/src/changes_trie/prune.rs b/substrate/core/state-machine/src/changes_trie/prune.rs index de872a3255..7a8654971a 100644 --- a/substrate/core/state-machine/src/changes_trie/prune.rs +++ b/substrate/core/state-machine/src/changes_trie/prune.rs @@ -41,9 +41,9 @@ pub fn oldest_non_pruned_trie( } } -/// Prune obslete changes tries. Puning happens at the same block, where highest +/// Prune obsolete changes tries. Pruning happens at the same block, where highest /// level digest is created. Pruning guarantees to save changes tries for last -/// `min_blocks_to_keep` blocks. We only prune changes tries at `max_digest_iterval` +/// `min_blocks_to_keep` blocks. We only prune changes tries at `max_digest_interval` /// ranges. /// Returns MemoryDB that contains all deleted changes tries nodes. pub fn prune, H: Hasher, F: FnMut(H::Out)>( diff --git a/substrate/core/transaction-pool/graph/src/base_pool.rs b/substrate/core/transaction-pool/graph/src/base_pool.rs index ad434e57d4..2b4b96839d 100644 --- a/substrate/core/transaction-pool/graph/src/base_pool.rs +++ b/substrate/core/transaction-pool/graph/src/base_pool.rs @@ -43,9 +43,9 @@ use crate::ready::ReadyTransactions; /// Successful import result. #[derive(Debug, PartialEq, Eq)] pub enum Imported { - /// Transaction was successfuly imported to Ready queue. + /// Transaction was successfully imported to Ready queue. Ready { - /// Hash of transaction that was successfuly imported. + /// Hash of transaction that was successfully imported. hash: Hash, /// Transactions that got promoted from the Future queue. promoted: Vec, @@ -54,9 +54,9 @@ pub enum Imported { /// Transactions removed from the Ready pool (replaced). removed: Vec>>, }, - /// Transaction was successfuly imported to Future queue. + /// Transaction was successfully imported to Future queue. Future { - /// Hash of transaction that was successfuly imported. + /// Hash of transaction that was successfully imported. hash: Hash, } } diff --git a/substrate/core/transaction-pool/graph/src/error.rs b/substrate/core/transaction-pool/graph/src/error.rs index 435ca922cd..bc2bc2c8c2 100644 --- a/substrate/core/transaction-pool/graph/src/error.rs +++ b/substrate/core/transaction-pool/graph/src/error.rs @@ -33,7 +33,7 @@ error_chain! { description("Runtime check for the transaction failed."), display("Invalid Transaction. Error Code: {}", e), } - /// The transaction is temporarily baned + /// The transaction is temporarily banned TemporarilyBanned { description("Transaction is temporarily banned from importing to the pool."), display("Temporarily Banned"), diff --git a/substrate/core/transaction-pool/graph/src/pool.rs b/substrate/core/transaction-pool/graph/src/pool.rs index 91ded26630..121e3ddf00 100644 --- a/substrate/core/transaction-pool/graph/src/pool.rs +++ b/substrate/core/transaction-pool/graph/src/pool.rs @@ -304,7 +304,7 @@ impl Pool { let hashes = status.pruned.iter().map(|tx| tx.hash.clone()).collect::>(); let results = self.submit_at(at, status.pruned.into_iter().map(|tx| tx.data.clone()))?; - // Collect the hashes of transactions that now became invalid (meaning that they are succesfuly pruned). + // Collect the hashes of transactions that now became invalid (meaning that they are succesfully pruned). let hashes = results.into_iter().enumerate().filter_map(|(idx, r)| match r.map_err(error::IntoPoolError::into_pool_error) { Err(Ok(err)) => match err.kind() { error::ErrorKind::InvalidTransaction(_) => Some(hashes[idx].clone()), @@ -333,7 +333,7 @@ impl Pool { /// /// Stale transactions are transaction beyond their longevity period. /// Note this function does not remove transactions that are already included in the chain. - /// See `prune_tags` ifyou want this. + /// See `prune_tags` if you want this. pub fn clear_stale(&self, at: &BlockId) -> Result<(), B::Error> { let block_number = self.api.block_id_to_number(at)? .ok_or_else(|| error::ErrorKind::Msg(format!("Invalid block id: {:?}", at)).into())? diff --git a/substrate/core/util/fork-tree/src/lib.rs b/substrate/core/util/fork-tree/src/lib.rs index f194ac8915..cba5a1535b 100644 --- a/substrate/core/util/fork-tree/src/lib.rs +++ b/substrate/core/util/fork-tree/src/lib.rs @@ -22,7 +22,7 @@ use std::fmt; use parity_codec::{Decode, Encode}; -/// Error occured when interating with the tree. +/// Error occured when iterating with the tree. #[derive(Clone, Debug, PartialEq)] pub enum Error { /// Adding duplicate node to tree. diff --git a/substrate/srml/contract/src/gas.rs b/substrate/srml/contract/src/gas.rs index b7244169c4..f42b0919f3 100644 --- a/substrate/srml/contract/src/gas.rs +++ b/substrate/srml/contract/src/gas.rs @@ -255,7 +255,7 @@ pub fn refund_unused_gas( } } -/// A little handy utility for converting a value in balance units into approximitate value in gas units +/// A little handy utility for converting a value in balance units into approximate value in gas units /// at the given gas price. pub fn approx_gas_for_balance(gas_price: BalanceOf, balance: BalanceOf) -> T::Gas { let amount_in_gas: BalanceOf = balance / gas_price; @@ -316,7 +316,7 @@ mod tests { struct DoubleTokenMetadata { multiplier: u64, } - /// A simple token that charges for the given amount multipled to + /// A simple token that charges for the given amount multiplied to /// a multiplier taken from a given metadata. #[derive(Copy, Clone, PartialEq, Eq, Debug)] struct DoubleToken(u64); @@ -324,7 +324,7 @@ mod tests { impl Token for DoubleToken { type Metadata = DoubleTokenMetadata; fn calculate_amount(&self, metadata: &DoubleTokenMetadata) -> u64 { - // Probably you want to use saturating mul in producation code. + // Probably you want to use saturating mul in production code. self.0 * metadata.multiplier } } diff --git a/substrate/srml/contract/src/lib.rs b/substrate/srml/contract/src/lib.rs index a5fa62f7ec..e9b218e097 100644 --- a/substrate/srml/contract/src/lib.rs +++ b/substrate/srml/contract/src/lib.rs @@ -308,7 +308,7 @@ decl_module! { let result = ctx.call(dest, value, &mut gas_meter, &data, exec::EmptyOutputBuf::new()); if let Ok(_) = result { - // Commit all changes that made it thus far into the persistant storage. + // Commit all changes that made it thus far into the persistent storage. DirectAccountDb.commit(ctx.overlay.into_change_set()); // Then deposit all events produced. @@ -362,7 +362,7 @@ decl_module! { let result = ctx.instantiate(endowment, &mut gas_meter, &code_hash, &data); if let Ok(_) = result { - // Commit all changes that made it thus far into the persistant storage. + // Commit all changes that made it thus far into the persistent storage. DirectAccountDb.commit(ctx.overlay.into_change_set()); // Then deposit all events produced. diff --git a/substrate/srml/contract/src/wasm/env_def/macros.rs b/substrate/srml/contract/src/wasm/env_def/macros.rs index 0b112a8258..bfb42d19d0 100644 --- a/substrate/srml/contract/src/wasm/env_def/macros.rs +++ b/substrate/srml/contract/src/wasm/env_def/macros.rs @@ -167,7 +167,7 @@ macro_rules! register_func { /// will panic if called with unexpected arguments. /// /// It's up to the user of this macro to check signatures of wasm code to be executed -/// and reject the code if any imported function has a mismached signature. +/// and reject the code if any imported function has a mismatched signature. macro_rules! define_env { ( $init_name:ident , < E: $ext_ty:tt > , $( $name:ident ( $ctx:ident $( , $names:ident : $params:ty )* ) diff --git a/substrate/srml/contract/src/wasm/mod.rs b/substrate/srml/contract/src/wasm/mod.rs index 51db3b2e56..6aa7b73f52 100644 --- a/substrate/srml/contract/src/wasm/mod.rs +++ b/substrate/srml/contract/src/wasm/mod.rs @@ -155,8 +155,8 @@ impl<'a, T: Trait> crate::exec::Vm for WasmVm<'a, T> { Err(err @ sandbox::Error::Execution) => to_execution_result(runtime, Some(err)), Err(_err @ sandbox::Error::Module) => { // `Error::Module` is returned only if instantiation or linking failed (i.e. - // wasm bianry tried to import a function that is not provided by the host). - // This shouldn't happen because validation proccess ought to reject such binaries. + // wasm binary tried to import a function that is not provided by the host). + // This shouldn't happen because validation process ought to reject such binaries. // // Because panics are really undesirable in the runtime code, we treat this as // a trap for now. Eventually, we might want to revisit this. diff --git a/substrate/srml/contract/src/wasm/prepare.rs b/substrate/srml/contract/src/wasm/prepare.rs index 53883451b4..94a38ef588 100644 --- a/substrate/srml/contract/src/wasm/prepare.rs +++ b/substrate/srml/contract/src/wasm/prepare.rs @@ -318,7 +318,7 @@ pub fn prepare_contract( (initial, Some(maximum)) => MemoryDefinition { initial, maximum }, (_, None) => { // Maximum number of pages should be always declared. - // This isn't a hard requirement and can be treated as a maxiumum set + // This isn't a hard requirement and can be treated as a maximum set // to configured maximum. return Err("Maximum number of pages should be always declared."); } diff --git a/substrate/srml/support/procedural/tools/derive/src/lib.rs b/substrate/srml/support/procedural/tools/derive/src/lib.rs index 0e3fcb2247..4bf1a5f44c 100644 --- a/substrate/srml/support/procedural/tools/derive/src/lib.rs +++ b/substrate/srml/support/procedural/tools/derive/src/lib.rs @@ -58,7 +58,7 @@ pub(crate) fn fields_access( /// For enums: /// variant are tested in order of definition. /// Empty variant is always true. -/// Please use carefully, this will fully parse successfull variant twice. +/// Please use carefully, this will fully parse successful variant twice. #[proc_macro_derive(Parse)] pub fn derive_parse(input: TokenStream) -> TokenStream { let item = parse_macro_input!(input as syn::Item); diff --git a/substrate/srml/support/procedural/tools/src/lib.rs b/substrate/srml/support/procedural/tools/src/lib.rs index fd7dd41391..1b8a580773 100644 --- a/substrate/srml/support/procedural/tools/src/lib.rs +++ b/substrate/srml/support/procedural/tools/src/lib.rs @@ -71,8 +71,8 @@ pub fn generate_hidden_includes(unique_id: &str, def_crate: &str) -> TokenStream } } -// fn to remove white spaces arount string types -// (basically whitespaces arount tokens) +// fn to remove white spaces around string types +// (basically whitespaces around tokens) pub fn clean_type_string(input: &str) -> String { input .replace(" ::", "::") diff --git a/substrate/srml/system/src/lib.rs b/substrate/srml/system/src/lib.rs index 92e7b6e73e..e3d77438f9 100644 --- a/substrate/srml/system/src/lib.rs +++ b/substrate/srml/system/src/lib.rs @@ -372,7 +372,7 @@ pub fn ensure_inherent(o: OuterOrigin) -> Result<(), &'s } impl Module { - /// Gets the index of extrinsic that is currenty executing. + /// Gets the index of extrinsic that is currently executing. pub fn extrinsic_index() -> Option { storage::unhashed::get(well_known_keys::EXTRINSIC_INDEX) } @@ -462,7 +462,7 @@ impl Module { >::put(n); } - /// Sets the index of extrinsic that is currenty executing. + /// Sets the index of extrinsic that is currently executing. #[cfg(any(feature = "std", test))] pub fn set_extrinsic_index(extrinsic_index: u32) { storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &extrinsic_index)