From f3cffea13eb7c3b3cc6db50768b88946c4833f93 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:35:10 +0100 Subject: [PATCH 001/201] meaningfull -> meaningful --- frame/staking/src/tests.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index 73f1afd6345ad..73215d6117776 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -235,7 +235,7 @@ fn multi_era_reward_should_work() { // Compute now as other parameter won't change let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 10); // Test is meaningfull if reward something + assert!(total_payout_0 > 10); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 1)]); start_session(0); @@ -249,7 +249,7 @@ fn multi_era_reward_should_work() { start_session(4); let total_payout_1 = current_total_payout_for_duration(3000); - assert!(total_payout_1 > 10); // Test is meaningfull if reward something + assert!(total_payout_1 > 10); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 101)]); // new era is triggered here. @@ -458,7 +458,7 @@ fn nominating_and_rewards_should_work() { // the total reward for era 0 let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 100); // Test is meaningfull if reward something + assert!(total_payout_0 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(41, 1)]); >::reward_by_ids(vec![(31, 1)]); >::reward_by_ids(vec![(21, 10)]); // must be no-op @@ -506,7 +506,7 @@ fn nominating_and_rewards_should_work() { // the total reward for era 1 let total_payout_1 = current_total_payout_for_duration(3000); - assert!(total_payout_1 > 100); // Test is meaningfull if reward something + assert!(total_payout_1 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(41, 10)]); // must be no-op >::reward_by_ids(vec![(31, 10)]); // must be no-op >::reward_by_ids(vec![(21, 2)]); @@ -575,7 +575,7 @@ fn nominators_also_get_slashed() { assert_ok!(Staking::nominate(Origin::signed(2), vec![20, 10])); let total_payout = current_total_payout_for_duration(3000); - assert!(total_payout > 100); // Test is meaningfull if reward something + assert!(total_payout > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 1)]); // new era, pay rewards, @@ -850,7 +850,7 @@ fn reward_destination_works() { // Compute total payout now for whole duration as other parameter won't change let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 100); // Test is meaningfull if reward something + assert!(total_payout_0 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 1)]); start_era(1); @@ -872,7 +872,7 @@ fn reward_destination_works() { // Compute total payout now for whole duration as other parameter won't change let total_payout_1 = current_total_payout_for_duration(3000); - assert!(total_payout_1 > 100); // Test is meaningfull if reward something + assert!(total_payout_1 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 1)]); start_era(2); @@ -899,7 +899,7 @@ fn reward_destination_works() { // Compute total payout now for whole duration as other parameter won't change let total_payout_2 = current_total_payout_for_duration(3000); - assert!(total_payout_2 > 100); // Test is meaningfull if reward something + assert!(total_payout_2 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 1)]); start_era(3); @@ -949,7 +949,7 @@ fn validator_payment_prefs_work() { // Compute total payout now for whole duration as other parameter won't change let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 100); // Test is meaningfull if reward something + assert!(total_payout_0 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 1)]); start_era(1); @@ -1393,7 +1393,7 @@ fn slot_stake_is_least_staked_validator_and_exposure_defines_maximum_punishment( // Compute total payout now for whole duration as other parameter won't change let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 100); // Test is meaningfull if reward something + assert!(total_payout_0 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(11, 1)]); >::reward_by_ids(vec![(21, 1)]); @@ -1678,7 +1678,7 @@ fn bond_with_little_staked_value_bounded_by_slot_stake() { assert_ok!(Staking::validate(Origin::signed(2), ValidatorPrefs::default())); let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 100); // Test is meaningfull if reward something + assert!(total_payout_0 > 100); // Test is meaningful if reward something reward_all_elected(); start_era(1); @@ -1693,7 +1693,7 @@ fn bond_with_little_staked_value_bounded_by_slot_stake() { assert_eq!(Balances::free_balance(2), init_balance_2); let total_payout_1 = current_total_payout_for_duration(3000); - assert!(total_payout_1 > 100); // Test is meaningfull if reward something + assert!(total_payout_1 > 100); // Test is meaningful if reward something reward_all_elected(); start_era(2); From 8d8f3946f1fd57b53a1f93432b50c0c858121804 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:39:14 +0100 Subject: [PATCH 002/201] initialise -> initialize --- frame/randomness-collective-flip/src/lib.rs | 2 +- frame/staking/src/lib.rs | 2 +- frame/system/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/randomness-collective-flip/src/lib.rs b/frame/randomness-collective-flip/src/lib.rs index 64d8f40099d1b..d35025546c15c 100644 --- a/frame/randomness-collective-flip/src/lib.rs +++ b/frame/randomness-collective-flip/src/lib.rs @@ -135,7 +135,7 @@ impl Randomness for Module { let hash_series = >::get(); if !hash_series.is_empty() { - // Always the case after block 1 is initialised. + // Always the case after block 1 is initialized. hash_series.iter() .cycle() .skip(index) diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 447f655048a6b..11aad9209954e 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -1360,7 +1360,7 @@ impl Module { Self::new_era(session_index) } - /// Initialise the first session (and consequently the first era) + /// Initialize the first session (and consequently the first era) fn initial_session() -> Option> { // note: `CurrentEraStart` is set in `on_finalize` of the first block because now is not // available yet. diff --git a/frame/system/src/lib.rs b/frame/system/src/lib.rs index c351020a41057..57be7b157cb33 100644 --- a/frame/system/src/lib.rs +++ b/frame/system/src/lib.rs @@ -720,7 +720,7 @@ impl Module { /// Even more dangerous is to note that this function does NOT take any action, if the new sum /// of block weight is more than the block weight limit. This is what the _unchecked_. /// - /// Another potential use-case could be for the `on_initialise` and `on_finalize` hooks. + /// Another potential use-case could be for the `on_initialize` and `on_finalize` hooks. /// /// If no previous weight exists, the function initializes the weight to zero. pub fn register_extra_weight_unchecked(weight: Weight) { From c11054aead43607f79d3c1dc72037e020875e544 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:40:21 +0100 Subject: [PATCH 003/201] tokans -> tokens --- frame/staking/src/inflation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/staking/src/inflation.rs b/frame/staking/src/inflation.rs index d5135fcc1ffb3..e75ac3af2bf33 100644 --- a/frame/staking/src/inflation.rs +++ b/frame/staking/src/inflation.rs @@ -24,7 +24,7 @@ use sp_runtime::{Perbill, PerThing, traits::AtLeast32Bit, curve::PiecewiseLinear /// The total payout to all validators (and their nominators) per era. /// /// Defined as such: -/// `payout = yearly_inflation(npos_token_staked / total_tokens) * total_tokans / era_per_year` +/// `payout = yearly_inflation(npos_token_staked / total_tokens) * total_tokens / era_per_year` /// /// `era_duration` is expressed in millisecond. pub fn compute_total_payout( From 55987bb40b1b3ddfc379261db0e97178cd6f4c93 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:45:42 +0100 Subject: [PATCH 004/201] incentivise -> incentivize --- frame/staking/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 11aad9209954e..3f84597912f53 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -171,7 +171,7 @@ //! //! Validators and nominators are rewarded at the end of each era. The total reward of an era is //! calculated using the era duration and the staking rate (the total amount of tokens staked by -//! nominators and validators, divided by the total token supply). It aims to incentivise toward a +//! nominators and validators, divided by the total token supply). It aims to incentivize toward a //! defined staking rate. The full specification can be found //! [here](https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model). //! From 8b5abdbe3f5a86fee5d98c090b59bec378ae4d13 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:47:27 +0100 Subject: [PATCH 005/201] lenght -> length --- frame/staking/reward-curve/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/staking/reward-curve/src/lib.rs b/frame/staking/reward-curve/src/lib.rs index 3c31cecc21458..0eda3ed3d6314 100644 --- a/frame/staking/reward-curve/src/lib.rs +++ b/frame/staking/reward-curve/src/lib.rs @@ -271,7 +271,7 @@ fn compute_points(input: &INposInput) -> Vec<(u32, u32)> { points.push((0, inpos.i_0)); points.push((inpos.x_ideal, inpos.i_ideal_times_x_ideal)); - // For each point p: (next_p.0 - p.0) < segment_lenght && (next_p.1 - p.1) < segment_lenght. + // For each point p: (next_p.0 - p.0) < segment_length && (next_p.1 - p.1) < segment_length. // This ensures that the total number of segment doesn't overflow max_piece_count. let max_length = (input.max_inflation - input.min_inflation + 1_000_000 - inpos.x_ideal) / (input.max_piece_count - 1); From 3e612d77405cac58e3fd7e7df719044d3623f17b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:53:31 +0100 Subject: [PATCH 006/201] incentivisation -> incentivization --- frame/staking/reward-curve/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/staking/reward-curve/src/lib.rs b/frame/staking/reward-curve/src/lib.rs index 0eda3ed3d6314..51af0a33a35f7 100644 --- a/frame/staking/reward-curve/src/lib.rs +++ b/frame/staking/reward-curve/src/lib.rs @@ -27,7 +27,7 @@ use syn::parse::{Parse, ParseStream}; /// Expressed in millionth, must be between 0_100_000 and 0_900_000. /// /// - `falloff`: Known as `decay_rate` in the literature. A co-efficient dictating the strength of -/// the global incentivisation to get the `ideal_stake`. A higher number results in less typical +/// the global incentivization to get the `ideal_stake`. A higher number results in less typical /// inflation at the cost of greater volatility for validators. /// Expressed in millionth, must be between 0 and 1_000_000. /// From d39fc657a17f6a6f2da004cb1cdfaaa9a321ee6d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:54:38 +0100 Subject: [PATCH 007/201] doesnt't -> doesn't --- client/src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/client.rs b/client/src/client.rs index d085b92025fdf..435b112616503 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -3041,7 +3041,7 @@ pub(crate) mod tests { .unwrap().build().unwrap().block; // we will finalize A2 which should make it impossible to import a new - // B3 at the same height but that doesnt't include it + // B3 at the same height but that doesn't include it ClientExt::finalize_block(&client, BlockId::Hash(a2.hash()), None).unwrap(); let import_err = client.import(BlockOrigin::Own, b3).err().unwrap(); From ececdee7ef83859a5049bb5a06210cb465ef7048 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 14:58:04 +0100 Subject: [PATCH 008/201] overwriten -> overwritten --- frame/democracy/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 33ddf69427978..c2c44918b036c 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -2066,7 +2066,7 @@ mod tests { } #[test] - /// If transactor already voted, delegated vote is overwriten. + /// If transactor already voted, delegated vote is overwritten. fn single_proposal_should_work_with_vote_and_delegation() { new_test_ext().execute_with(|| { System::set_block_number(0); @@ -2121,7 +2121,7 @@ mod tests { } #[test] - /// If transactor voted, delegated vote is overwriten. + /// If transactor voted, delegated vote is overwritten. fn single_proposal_should_work_with_delegation_and_vote() { new_test_ext().execute_with(|| { System::set_block_number(0); From 9a4baf52a8f49423cbfcee84882a440ce9eb4b59 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:02:58 +0100 Subject: [PATCH 009/201] lifecycle -> life cycle --- client/rpc-api/src/author/mod.rs | 2 +- client/transaction-pool/graph/src/listener.rs | 2 +- frame/example/src/lib.rs | 2 +- frame/recovery/src/lib.rs | 4 ++-- frame/recovery/src/tests.rs | 2 +- frame/society/src/tests.rs | 2 +- frame/support/src/weights.rs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/rpc-api/src/author/mod.rs b/client/rpc-api/src/author/mod.rs index 4fbf0c73a3666..49c4c996fa9e1 100644 --- a/client/rpc-api/src/author/mod.rs +++ b/client/rpc-api/src/author/mod.rs @@ -77,7 +77,7 @@ pub trait AuthorApi { /// Submit an extrinsic to watch. /// /// See [`TransactionStatus`](sp_transaction_pool::TransactionStatus) for details on transaction - /// lifecycle. + /// life cycle. #[pubsub( subscription = "author_extrinsicUpdate", subscribe, diff --git a/client/transaction-pool/graph/src/listener.rs b/client/transaction-pool/graph/src/listener.rs index be6fb5c990585..92ba71007e209 100644 --- a/client/transaction-pool/graph/src/listener.rs +++ b/client/transaction-pool/graph/src/listener.rs @@ -58,7 +58,7 @@ impl Listener { /// Creates a new watcher for given verified extrinsic. /// - /// The watcher can be used to subscribe to lifecycle events of that extrinsic. + /// The watcher can be used to subscribe to life-cycle events of that extrinsic. pub fn create_watcher(&mut self, hash: H) -> watcher::Watcher> { let sender = self.watchers.entry(hash.clone()).or_insert_with(watcher::Sender::default); sender.new_watcher(hash) diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index fb8a162d41827..d048235ecc9f2 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -572,7 +572,7 @@ impl Module { // method. This example will not cover this type of extension. See `CheckRuntime` in system module // for an example. // -// Using the extension, you can add some hooks to the lifecycle of each transaction. Note that by +// Using the extension, you can add some hooks to the life cycle of each transaction. Note that by // default, an extension is applied to all `Call` functions (i.e. all transactions). the `Call` enum // variant is given to each function of `SignedExtension`. Hence, you can filter based on module or // a particular call if needed. diff --git a/frame/recovery/src/lib.rs b/frame/recovery/src/lib.rs index d293e1da9a072..b456d17c68d81 100644 --- a/frame/recovery/src/lib.rs +++ b/frame/recovery/src/lib.rs @@ -44,9 +44,9 @@ //! the number of friends chosen. This deposit is returned in full when the account //! owner removes their recovery configuration. //! -//! ### Recovery Lifecycle +//! ### Recovery Life Cycle //! -//! The intended lifecycle of a successful recovery takes the following steps: +//! The intended life cycle of a successful recovery takes the following steps: //! 1. The account owner calls `create_recovery` to set up a recovery configuration //! for their account. //! 2. At some later time, the account owner loses access to their account and wants diff --git a/frame/recovery/src/tests.rs b/frame/recovery/src/tests.rs index af4eadb58fa39..97d4791cce508 100644 --- a/frame/recovery/src/tests.rs +++ b/frame/recovery/src/tests.rs @@ -56,7 +56,7 @@ fn set_recovered_works() { } #[test] -fn recovery_lifecycle_works() { +fn recovery_life_cycle_works() { new_test_ext().execute_with(|| { let friends = vec![2, 3, 4]; let threshold = 3; diff --git a/frame/society/src/tests.rs b/frame/society/src/tests.rs index 47d13d8361c2b..8b10dc32e7ba0 100644 --- a/frame/society/src/tests.rs +++ b/frame/society/src/tests.rs @@ -282,7 +282,7 @@ fn slash_payout_multi_works() { } #[test] -fn suspended_member_lifecycle_works() { +fn suspended_member_life_cycle_works() { EnvBuilder::new().execute(|| { // Add 20 to members, who is not the head and can be suspended/removed. assert_ok!(Society::add_member(&20)); diff --git a/frame/support/src/weights.rs b/frame/support/src/weights.rs index 34166c368c8df..5407dc436045c 100644 --- a/frame/support/src/weights.rs +++ b/frame/support/src/weights.rs @@ -67,7 +67,7 @@ pub trait ClassifyDispatch { fn classify_dispatch(&self, target: T) -> DispatchClass; } -/// Means of determining the weight of a block's lifecycle hooks: on_initialize, on_finalize and +/// Means of determining the weight of a block's life cycle hooks: on_initialize, on_finalize and /// such. pub trait WeighBlock { /// Return the weight of the block's on_initialize hook. From 70bdd9d1dd1c381f33d0b7b69f805ad97d881bb4 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:04:17 +0100 Subject: [PATCH 010/201] lifecycle -> life cycle --- frame/session/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/session/src/lib.rs b/frame/session/src/lib.rs index a18d55d26cbc1..5226415400ad4 100644 --- a/frame/session/src/lib.rs +++ b/frame/session/src/lib.rs @@ -168,7 +168,7 @@ impl SessionManager for () { fn end_session(_: SessionIndex) {} } -/// Handler for session lifecycle events. +/// Handler for session life cycle events. pub trait SessionHandler { /// All the key type ids this session handler can process. /// From 8648c159e1ae30d0035e90a1914246497c5fce62 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:06:02 +0100 Subject: [PATCH 011/201] usefull -> useful --- frame/treasury/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index 36f92c401e329..d2d07bfa4ab53 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -1135,7 +1135,7 @@ mod tests { } // In case treasury account is not existing then it works fine. - // This is usefull for chain that will just update runtime. + // This is useful for chain that will just update runtime. #[test] fn inexisting_account_works() { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); From 357b77e2159984823f2035ff6d151fae1e718693 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:07:36 +0100 Subject: [PATCH 012/201] noone -> no one --- .maintain/kubernetes/values.yaml | 2 +- client/network/src/protocol/light_dispatch.rs | 2 +- frame/elections/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.maintain/kubernetes/values.yaml b/.maintain/kubernetes/values.yaml index 89a6445e00a2f..4c3cb5c7d702d 100644 --- a/.maintain/kubernetes/values.yaml +++ b/.maintain/kubernetes/values.yaml @@ -48,7 +48,7 @@ validator: {} # substrate-1-node-key # # pod names are canonical. changing these or providing different amount of - # keys than the replicas count will lead to behavior noone ever has + # keys than the replicas count will lead to behavior no one ever has # experienced before. diff --git a/client/network/src/protocol/light_dispatch.rs b/client/network/src/protocol/light_dispatch.rs index 2eab0a5a3ffe0..b26d18b89c3de 100644 --- a/client/network/src/protocol/light_dispatch.rs +++ b/client/network/src/protocol/light_dispatch.rs @@ -567,7 +567,7 @@ impl LightDispatch where // return peer to the back of the queue self.idle_peers.push_back(peer.clone()); - // we have enumerated all peers and noone can handle request + // we have enumerated all peers and no one can handle request if Some(peer) == last_peer { let request = self.pending_requests.pop_front().expect("checked in loop condition; qed"); unhandled_requests.push_back(request); diff --git a/frame/elections/src/lib.rs b/frame/elections/src/lib.rs index a3fdd74426c3a..95d1858476287 100644 --- a/frame/elections/src/lib.rs +++ b/frame/elections/src/lib.rs @@ -81,7 +81,7 @@ mod tests; // for B blocks following, there's a counting period whereby each of the candidates that believe // they fall in the top K+C voted can present themselves. they get the total stake -// recorded (based on the snapshot); an ordered list is maintained (the leaderboard). Noone may +// recorded (based on the snapshot); an ordered list is maintained (the leaderboard). No one may // present themselves that, if elected, would result in being included twice in the collective // (important since existing members will have their approval votes as it may be that they // don't get removed), nor if existing presenters would mean they're not in the top K+C. From e12d26a20c6801311f0c56f2e6d14cd54843b184 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:12:09 +0100 Subject: [PATCH 013/201] spaming -> spamming --- frame/im-online/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index 9a3fc2430c054..74847c37df96d 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -576,7 +576,7 @@ impl pallet_session::OneSessionHandler for Module { { // Tell the offchain worker to start making the next session's heartbeats. // Since we consider producing blocks as being online, - // the heartbeat is defered a bit to prevent spaming. + // the heartbeat is defered a bit to prevent spamming. let block_number = >::block_number(); let half_session = T::SessionDuration::get() / 2.into(); >::put(block_number + half_session); From 723e55154da05e66c57d48c1245ad7ff8a22b25a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:12:31 +0100 Subject: [PATCH 014/201] defered -> deferred --- frame/im-online/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index 74847c37df96d..fe99d5eae39fb 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -576,7 +576,7 @@ impl pallet_session::OneSessionHandler for Module { { // Tell the offchain worker to start making the next session's heartbeats. // Since we consider producing blocks as being online, - // the heartbeat is defered a bit to prevent spamming. + // the heartbeat is deferred a bit to prevent spamming. let block_number = >::block_number(); let half_session = T::SessionDuration::get() / 2.into(); >::put(block_number + half_session); From 75be5ad10ed4bb5eeb998d70dd800d40a2782982 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:14:53 +0100 Subject: [PATCH 015/201] hieght -> height --- frame/utility/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index 414651659c022..91d00e8808f74 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -105,7 +105,7 @@ pub trait Trait: frame_system::Trait { /// composite was created to be uniquely identified. #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Default, RuntimeDebug)] pub struct Timepoint { - /// The hieght of the chain at the point in time. + /// The height of the chain at the point in time. height: BlockNumber, /// The index of the extrinsic at the point in time. index: u32, From 49d5c46abe9e690aa6e8b11318e4b15bc841358b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:15:37 +0100 Subject: [PATCH 016/201] sumation -> summation --- frame/utility/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index 91d00e8808f74..c19b044ad7697 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -210,7 +210,7 @@ impl PaysFee<(&u16, &Box)> for Passthrough { } } -/// Sumation pass-through for the weight function of the batch call. +/// Summation pass-through for the weight function of the batch call. /// /// This just adds all of the weights together of all of the calls. struct BatchPassthrough(sp_std::marker::PhantomData); From cdaaa3c734b3afa4fd95d5ccb6b75d4628987e83 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:18:20 +0100 Subject: [PATCH 017/201] ingore -> ignore --- frame/support/src/dispatch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/src/dispatch.rs b/frame/support/src/dispatch.rs index c2f42fd56124d..2a3e638de3096 100644 --- a/frame/support/src/dispatch.rs +++ b/frame/support/src/dispatch.rs @@ -819,7 +819,7 @@ macro_rules! decl_module { // TODO: this probably should be a different macro? (@call - $ingore:ident + $ignore:ident $mod_type:ident<$trait_instance:ident $(, $instance:ident)?> $fn_name:ident $origin:ident $system:ident [ $( $param_name:ident),* ] ) => { <$mod_type<$trait_instance $(, $instance)?>>::$fn_name( $origin $(, $param_name )* ) From d1dd5ce5b50d59a3e764ccafd9d657fd850ec8cf Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:18:50 +0100 Subject: [PATCH 018/201] registed -> registered --- frame/support/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/src/error.rs b/frame/support/src/error.rs index 34de38108f254..3b105e979d09a 100644 --- a/frame/support/src/error.rs +++ b/frame/support/src/error.rs @@ -28,7 +28,7 @@ pub use frame_metadata::{ModuleErrorMetadata, ErrorMetadata, DecodeDifferent}; /// implements `From for DispatchResult` to make the error type usable as error /// in the dispatchable functions. /// -/// It is required that the error type is registed in `decl_module!` to make the error +/// It is required that the error type is registered in `decl_module!` to make the error /// exported in the metadata. /// /// # Usage From d33db79484f81d560f0654396c91cea05d3ace7c Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:22:53 +0100 Subject: [PATCH 019/201] Auxialary -> Auxiliary --- frame/support/procedural/tools/src/syn_ext.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/procedural/tools/src/syn_ext.rs b/frame/support/procedural/tools/src/syn_ext.rs index 7b0a2cb93fa6b..45774372325ae 100644 --- a/frame/support/procedural/tools/src/syn_ext.rs +++ b/frame/support/procedural/tools/src/syn_ext.rs @@ -180,7 +180,7 @@ pub fn extract_type_option(typ: &syn::Type) -> Option { None } -/// Auxialary structure to check if a given `Ident` is contained in an ast. +/// Auxiliary structure to check if a given `Ident` is contained in an ast. struct ContainsIdent<'a> { ident: &'a Ident, result: bool, From a4f2889e1cbcdde33ae446436ddb316f37ecee14 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:23:23 +0100 Subject: [PATCH 020/201] loggin -> logging --- frame/support/src/debug.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/src/debug.rs b/frame/support/src/debug.rs index 29847b70e5ca6..4b7ff6cc39336 100644 --- a/frame/support/src/debug.rs +++ b/frame/support/src/debug.rs @@ -24,7 +24,7 @@ //! and size of the blob. Luckily there are some ways to mitigate //! this that are described below. //! -//! First component to utilize debug-printing and loggin is actually +//! First component to utilize debug-printing and logging is actually //! located in `primitives` crate: `sp_core::RuntimeDebug`. //! This custom-derive generates `core::fmt::Debug` implementation, //! just like regular `derive(Debug)`, however it does not generate From 197fdca2a289929ed738f0854d2b4c03dd6e6efe Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:25:33 +0100 Subject: [PATCH 021/201] independance -> independence --- frame/support/test/tests/instance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/test/tests/instance.rs b/frame/support/test/tests/instance.rs index 48854baad9f2f..6fa2806dd3483 100644 --- a/frame/support/test/tests/instance.rs +++ b/frame/support/test/tests/instance.rs @@ -300,7 +300,7 @@ fn new_test_ext() -> sp_io::TestExternalities { } #[test] -fn storage_instance_independance() { +fn storage_instance_independence() { let mut storage = sp_core::storage::Storage { top: std::collections::BTreeMap::new(), children: std::collections::HashMap::new() From b7e12a087d115baec1dbbf8205532ffcdf301d29 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:27:05 +0100 Subject: [PATCH 022/201] trailling -> trailing --- frame/support/src/event.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/src/event.rs b/frame/support/src/event.rs index d30e6ddeea0c7..8b7de01159df3 100644 --- a/frame/support/src/event.rs +++ b/frame/support/src/event.rs @@ -641,7 +641,7 @@ mod tests { } decl_event!( - /// Event finish formatting on an unnamed one with trailling comma + /// Event finish formatting on an unnamed one with trailing comma pub enum Event where ::Balance, ::Origin, From f9a60a8794b50f54a704ba94e68bd835db172fa2 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:27:35 +0100 Subject: [PATCH 023/201] responsability -> responsibility --- frame/support/src/storage/child.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/src/storage/child.rs b/frame/support/src/storage/child.rs index f549ffc25fd94..d4d046a9d4245 100644 --- a/frame/support/src/storage/child.rs +++ b/frame/support/src/storage/child.rs @@ -22,7 +22,7 @@ //! //! A **key collision free** unique id is required as parameter to avoid key collision //! between child tries. -//! This unique id management and generation responsability is delegated to pallet module. +//! This unique id management and generation responsibility is delegated to pallet module. // NOTE: could replace unhashed by having only one kind of storage (root being null storage key (storage_key can become Option<&[u8]>). use crate::sp_std::prelude::*; From f1e70d136a3c7f3f16b2d74226c1476f5e0ee827 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:28:24 +0100 Subject: [PATCH 024/201] trunkated -> truncated --- frame/support/procedural/src/storage/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/support/procedural/src/storage/mod.rs b/frame/support/procedural/src/storage/mod.rs index 453cb9c4678ca..5a14dd6773757 100644 --- a/frame/support/procedural/src/storage/mod.rs +++ b/frame/support/procedural/src/storage/mod.rs @@ -283,7 +283,7 @@ impl StorageLineDefExt { None }; - let storage_trait_trunkated = match &storage_def.storage_type { + let storage_trait_truncated = match &storage_def.storage_type { StorageLineTypeDef::Simple(_) => { quote!( StorageValue<#value_type> ) }, @@ -302,8 +302,8 @@ impl StorageLineDefExt { }, }; - let storage_trait = quote!( storage::#storage_trait_trunkated ); - let storage_generator_trait = quote!( storage::generator::#storage_trait_trunkated ); + let storage_trait = quote!( storage::#storage_trait_truncated ); + let storage_generator_trait = quote!( storage::generator::#storage_trait_truncated ); let doc_attrs = storage_def.attrs.iter() .filter_map(|a| a.parse_meta().ok()) From 71e7ae489726675db70593be4be7d6b7f5981079 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:29:06 +0100 Subject: [PATCH 025/201] Weither -> Whether --- frame/support/procedural/src/storage/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/support/procedural/src/storage/mod.rs b/frame/support/procedural/src/storage/mod.rs index 5a14dd6773757..b5e22881d447f 100644 --- a/frame/support/procedural/src/storage/mod.rs +++ b/frame/support/procedural/src/storage/mod.rs @@ -219,9 +219,9 @@ pub struct StorageLineDefExt { storage_trait: proc_macro2::TokenStream, /// Full trait, for example: `storage::generator::StorageMap`. storage_generator_trait: proc_macro2::TokenStream, - /// Weither the storage is generic. + /// Whether the storage is generic. is_generic: bool, - /// Weither the storage value is an option. + /// Whether the storage value is an option. is_option: bool, } From 068b1bc6d097582200fc080e1e9303dc5336d2e6 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:31:31 +0100 Subject: [PATCH 026/201] informations -> information --- frame/support/procedural/src/storage/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/procedural/src/storage/mod.rs b/frame/support/procedural/src/storage/mod.rs index b5e22881d447f..3345c5a123c18 100644 --- a/frame/support/procedural/src/storage/mod.rs +++ b/frame/support/procedural/src/storage/mod.rs @@ -29,7 +29,7 @@ use frame_support_procedural_tools::{ generate_crate_access, generate_hidden_includes, syn_ext as ext }; -/// All informations contained in input of decl_storage +/// All information contained in input of decl_storage pub struct DeclStorageDef { /// Name of the module used to import hidden imports. hidden_crate: Option, From 363dc1985f9d91c359e4ccde8530a7c0307a83c3 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:32:17 +0100 Subject: [PATCH 027/201] Runtume -> Runtime --- frame/support/procedural/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/procedural/src/lib.rs b/frame/support/procedural/src/lib.rs index b4376915a2e0e..407e57bc9ac04 100644 --- a/frame/support/procedural/src/lib.rs +++ b/frame/support/procedural/src/lib.rs @@ -200,7 +200,7 @@ use proc_macro::TokenStream; /// /// ```nocompile /// construct_runtime!( -/// pub enum Runtume with ... { +/// pub enum Runtime with ... { /// ..., /// Example: example::{Module, Storage, ..., Config}, /// ..., From f09aec3f945ce5e04baf5a3fb5ce764d9244a139 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:33:28 +0100 Subject: [PATCH 028/201] choosen -> chosen --- frame/support/procedural/src/lib.rs | 2 +- primitives/allocator/src/freeing_bump.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/support/procedural/src/lib.rs b/frame/support/procedural/src/lib.rs index 407e57bc9ac04..fe59e2a31d96e 100644 --- a/frame/support/procedural/src/lib.rs +++ b/frame/support/procedural/src/lib.rs @@ -123,7 +123,7 @@ use proc_macro::TokenStream; /// And [`StoragePrefixedMap`](../frame_support/storage/trait.StoragePrefixedMap.html). /// /// `$hash1` and `$hash2` representing choices of hashing algorithms available in the -/// [`Hashable`](../frame_support/trait.Hashable.html) trait. They must be choosen with care, see +/// [`Hashable`](../frame_support/trait.Hashable.html) trait. They must be chosen with care, see /// generator documentation. /// /// If the first key is untrusted, a cryptographic `hasher` such as `blake2_256` or diff --git a/primitives/allocator/src/freeing_bump.rs b/primitives/allocator/src/freeing_bump.rs index caac9dd6c417d..12fa492b8d40a 100644 --- a/primitives/allocator/src/freeing_bump.rs +++ b/primitives/allocator/src/freeing_bump.rs @@ -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; From 0e4e5462d88f31730f4b15ad2e0331441ef127fb Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:34:25 +0100 Subject: [PATCH 029/201] delcataion -> declaration --- frame/support/procedural/src/construct_runtime/parse.rs | 2 +- .../test/tests/construct_runtime_ui/abundant_where_param.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/support/procedural/src/construct_runtime/parse.rs b/frame/support/procedural/src/construct_runtime/parse.rs index 0559c45bbcdd7..92e1c01a04bca 100644 --- a/frame/support/procedural/src/construct_runtime/parse.rs +++ b/frame/support/procedural/src/construct_runtime/parse.rs @@ -83,7 +83,7 @@ impl Parse for WhereSection { }) = definitions.first() { let msg = format!( - "`{:?}` was declared above. Please use exactly one delcataion for `{:?}`.", + "`{:?}` was declared above. Please use exactly one declaration for `{:?}`.", kind, kind ); return Err(Error::new(*kind_span, msg)); diff --git a/frame/support/test/tests/construct_runtime_ui/abundant_where_param.stderr b/frame/support/test/tests/construct_runtime_ui/abundant_where_param.stderr index 4bac57d63c851..b622adbfe65b4 100644 --- a/frame/support/test/tests/construct_runtime_ui/abundant_where_param.stderr +++ b/frame/support/test/tests/construct_runtime_ui/abundant_where_param.stderr @@ -1,4 +1,4 @@ -error: `Block` was declared above. Please use exactly one delcataion for `Block`. +error: `Block` was declared above. Please use exactly one declaration for `Block`. --> $DIR/abundant_where_param.rs:7:3 | 7 | Block = Block1, From 2f34b1b2b3890415f364f8c5aed6f25b8013766e Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:35:36 +0100 Subject: [PATCH 030/201] Unchekced -> Unchecked --- .../test/tests/construct_runtime_ui/invalid_where_param.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/test/tests/construct_runtime_ui/invalid_where_param.rs b/frame/support/test/tests/construct_runtime_ui/invalid_where_param.rs index 13536338e07a6..dc1dc430ed426 100644 --- a/frame/support/test/tests/construct_runtime_ui/invalid_where_param.rs +++ b/frame/support/test/tests/construct_runtime_ui/invalid_where_param.rs @@ -5,7 +5,7 @@ construct_runtime! { Block = Block, NodeBlock = Block, TypeX = Block, - UnchekcedExtrinsic = UnchekcedExtrinsic, + UncheckedExtrinsic = UncheckedExtrinsic, {} } From 76423e9756fd474c4e7e7addb30280b3d224b8c1 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:36:07 +0100 Subject: [PATCH 031/201] defintion -> definition --- .../procedural/src/storage/genesis_config/genesis_config_def.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/procedural/src/storage/genesis_config/genesis_config_def.rs b/frame/support/procedural/src/storage/genesis_config/genesis_config_def.rs index 100907b2926d1..ae7ffa64bf5d5 100644 --- a/frame/support/procedural/src/storage/genesis_config/genesis_config_def.rs +++ b/frame/support/procedural/src/storage/genesis_config/genesis_config_def.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Genesis config defintion. +//! Genesis config definition. use frame_support_procedural_tools::syn_ext as ext; use proc_macro2::TokenStream; From 0a260c41216479908c7f184e550dcde36d7d66a6 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:37:25 +0100 Subject: [PATCH 032/201] scrach -> scratch --- frame/contracts/src/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 0062e2bbd4365..bae8b8113d841 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -2119,7 +2119,7 @@ const CODE_SELF_DESTRUCT: &str = r#" ;; Read own address into memory. (call $ext_scratch_read (i32.const 16) ;; Pointer to write address to - (i32.const 0) ;; Offset into scrach buffer + (i32.const 0) ;; Offset into scratch buffer (i32.const 8) ;; Length of encoded address ) @@ -2155,7 +2155,7 @@ const CODE_SELF_DESTRUCT: &str = r#" ;; Read balance into memory. (call $ext_scratch_read (i32.const 8) ;; Pointer to write balance to - (i32.const 0) ;; Offset into scrach buffer + (i32.const 0) ;; Offset into scratch buffer (i32.const 8) ;; Length of encoded balance ) @@ -2484,7 +2484,7 @@ const CODE_SELF_DESTRUCTING_CONSTRUCTOR: &str = r#" ;; Read balance into memory. (call $ext_scratch_read (i32.const 8) ;; Pointer to write balance to - (i32.const 0) ;; Offset into scrach buffer + (i32.const 0) ;; Offset into scratch buffer (i32.const 8) ;; Length of encoded balance ) From 271482bf142710926608be0b0bc4edd643c61a17 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:37:43 +0100 Subject: [PATCH 033/201] imput -> input --- frame/contracts/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index bae8b8113d841..623a7baf5aff9 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -2123,7 +2123,7 @@ const CODE_SELF_DESTRUCT: &str = r#" (i32.const 8) ;; Length of encoded address ) - ;; Recursively call self with empty imput data. + ;; Recursively call self with empty input data. (call $assert (i32.eq (call $ext_call From 183083e8d3518b2591d433a882456acf79cb1337 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:39:14 +0100 Subject: [PATCH 034/201] transfered -> transferred --- frame/contracts/src/wasm/runtime.rs | 2 +- frame/indices/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index b6a89281803f0..74984c829eede 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -719,7 +719,7 @@ define_env!(Env, , // contract are commited, this function will compute a tombstone hash from the caller's // storage and the given code hash and if the hash matches the hash found in the tombstone at // the specified address - kill the caller contract and restore the destination contract and set - // the specified `rent_allowance`. All caller's funds are transfered to the destination. + // the specified `rent_allowance`. All caller's funds are transferred to the destination. // // This function doesn't perform restoration right away but defers it to the end of the // transaction. If there is no tombstone in the destination address or if the hashes don't match diff --git a/frame/indices/src/lib.rs b/frame/indices/src/lib.rs index ad1a7f300fdb8..d59a50179372d 100644 --- a/frame/indices/src/lib.rs +++ b/frame/indices/src/lib.rs @@ -130,7 +130,7 @@ decl_module! { } /// Assign an index already owned by the sender to another account. The balance reservation - /// is effectively transfered to the new account. + /// is effectively transferred to the new account. /// /// The dispatch origin for this call must be _Signed_. /// From 3888830122d9c6e4cfb6fc95658d35ba2ab5313a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:40:43 +0100 Subject: [PATCH 035/201] endownment -> endowment --- frame/contracts/src/exec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index ec9fad93b4d4f..53a6c484fccdb 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -1122,7 +1122,7 @@ mod tests { ); }); - // This test sends 50 units of currency as an endownment to a newly + // This test sends 50 units of currency as an endowment to a newly // instantiated contract. ExtBuilder::default().existential_deposit(15).build().execute_with(|| { let mut loader = MockLoader::empty(); From 9519c3d068374d832aa4a4cbf75ab19c289c1295 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:42:17 +0100 Subject: [PATCH 036/201] Determinator -> Determiner --- bin/node/runtime/src/lib.rs | 2 +- frame/contracts/COMPLEXITY.md | 2 +- frame/contracts/src/lib.rs | 4 ++-- primitives/runtime/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 02814542158dd..e4187c8cda6f1 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -419,7 +419,7 @@ impl pallet_contracts::Trait for Runtime { type Randomness = RandomnessCollectiveFlip; type Call = Call; type Event = Event; - type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminator; + type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminer; type ComputeDispatchFee = pallet_contracts::DefaultDispatchFeeComputor; type TrieIdGenerator = pallet_contracts::TrieIdFromParentCounter; type GasPayment = (); diff --git a/frame/contracts/COMPLEXITY.md b/frame/contracts/COMPLEXITY.md index a29127f778f7e..2f4a3d9d9f209 100644 --- a/frame/contracts/COMPLEXITY.md +++ b/frame/contracts/COMPLEXITY.md @@ -236,7 +236,7 @@ This function takes the code of the constructor and input data. Instantiation of **Note** that the complexity of executing the constructor code should be considered separately. -**Note** that the complexity of `DetermineContractAddress` hook should be considered separately as well. Most likely it will use some kind of hashing over the code of the constructor and input data. The default `SimpleAddressDeterminator` does precisely that. +**Note** that the complexity of `DetermineContractAddress` hook should be considered separately as well. Most likely it will use some kind of hashing over the code of the constructor and input data. The default `SimpleAddressDeterminer` does precisely that. **Note** that the constructor returns code in the owned form and it's obtained via return facilities, which should have take fee for the return value. diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 19e070bd03dc9..674faf9656071 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -432,8 +432,8 @@ pub trait Trait: frame_system::Trait { /// and the account id that requested the account creation. /// /// Formula: `blake2_256(blake2_256(code) + blake2_256(data) + origin)` -pub struct SimpleAddressDeterminator(PhantomData); -impl ContractAddressFor, T::AccountId> for SimpleAddressDeterminator +pub struct SimpleAddressDeterminer(PhantomData); +impl ContractAddressFor, T::AccountId> for SimpleAddressDeterminer where T::AccountId: UncheckedFrom + AsRef<[u8]> { diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index 517141a210e06..4564effe488f1 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -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> crypto::UncheckedFrom for MultiSigner { fn unchecked_from(x: T) -> Self { From c2368523265dd075229d69c17c7e62bd2354bb40 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:43:04 +0100 Subject: [PATCH 037/201] relevent -> relevant --- frame/contracts/common/src/lib.rs | 2 +- frame/contracts/rpc/runtime-api/src/lib.rs | 2 +- frame/contracts/rpc/src/lib.rs | 2 +- frame/contracts/src/rent.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frame/contracts/common/src/lib.rs b/frame/contracts/common/src/lib.rs index e54b4c8d55393..6a74a417fa0fe 100644 --- a/frame/contracts/common/src/lib.rs +++ b/frame/contracts/common/src/lib.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! A crate that hosts a common definitions that are relevent for the pallet-contracts. +//! A crate that hosts a common definitions that are relevant for the pallet-contracts. #![cfg_attr(not(feature = "std"), no_std)] diff --git a/frame/contracts/rpc/runtime-api/src/lib.rs b/frame/contracts/rpc/runtime-api/src/lib.rs index fd83ba6534a45..6fb629b024581 100644 --- a/frame/contracts/rpc/runtime-api/src/lib.rs +++ b/frame/contracts/rpc/runtime-api/src/lib.rs @@ -76,7 +76,7 @@ sp_api::decl_runtime_apis! { /// Returns the projected time a given contract will be able to sustain paying its rent. /// - /// The returned projection is relevent for the current block, i.e. it is as if the contract + /// The returned projection is relevant for the current block, i.e. it is as if the contract /// was accessed at the current block. /// /// Returns `Err` if the contract is in a tombstone state or doesn't exist. diff --git a/frame/contracts/rpc/src/lib.rs b/frame/contracts/rpc/src/lib.rs index b0d6037416edb..52dddb177bbc7 100644 --- a/frame/contracts/rpc/src/lib.rs +++ b/frame/contracts/rpc/src/lib.rs @@ -138,7 +138,7 @@ pub trait ContractsApi { /// Returns the projected time a given contract will be able to sustain paying its rent. /// - /// The returned projection is relevent for the given block, i.e. it is as if the contract was + /// The returned projection is relevant for the given block, i.e. it is as if the contract was /// accessed at the beginning of that block. /// /// Returns `None` if the contract is exempted from rent. diff --git a/frame/contracts/src/rent.rs b/frame/contracts/src/rent.rs index 49beebbf0c202..8b6825419c81e 100644 --- a/frame/contracts/src/rent.rs +++ b/frame/contracts/src/rent.rs @@ -327,7 +327,7 @@ pub fn snitch_contract_should_be_evicted( } /// Returns the projected time a given contract will be able to sustain paying its rent. The -/// returned projection is relevent for the current block, i.e. it is as if the contract was +/// returned projection is relevant for the current block, i.e. it is as if the contract was /// accessed at the beginning of the current block. Returns `None` in case if the contract was /// evicted before or as a result of the rent collection. /// From c399fc8fbb074c3d0c4d76dd5967ccc0e316b55b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:43:30 +0100 Subject: [PATCH 038/201] emited -> emitted --- frame/contracts/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 623a7baf5aff9..031e841c1c17b 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -597,7 +597,7 @@ fn dispatch_call() { topics: vec![], }, - // Event emited as a result of dispatch. + // Event emitted as a result of dispatch. EventRecord { phase: Phase::ApplyExtrinsic(0), event: MetaEvent::contracts(RawEvent::Dispatched(BOB, true)), From dcd2a07b4caba0e8cd8a87c3bc9ed363054cd9e2 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:44:44 +0100 Subject: [PATCH 039/201] acocunt -> account --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 674faf9656071..7a40499230a34 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -143,7 +143,7 @@ pub trait ComputeDispatchFee { fn compute_dispatch_fee(call: &Call) -> Balance; } -/// Information for managing an acocunt and its sub trie abstraction. +/// Information for managing an account and its sub trie abstraction. /// This is the required info to cache for an account #[derive(Encode, Decode, RuntimeDebug)] pub enum ContractInfo { From 5e0bf5004fdf835d81df096da3a49e6d33f17d2b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:45:54 +0100 Subject: [PATCH 040/201] proprotional -> proportional --- frame/contracts/COMPLEXITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/COMPLEXITY.md b/frame/contracts/COMPLEXITY.md index 2f4a3d9d9f209..e44d3006c8ed3 100644 --- a/frame/contracts/COMPLEXITY.md +++ b/frame/contracts/COMPLEXITY.md @@ -141,7 +141,7 @@ Note that in case of storage modification we need to construct a key in the unde - then perform `blake2_256` hashing of the storage key. - concatenation of these hashes will constitute the key in the underlying storage. -There is also a special case to think of: if the balance of some account goes below `existential_deposit`, then all storage entries of that account will be erased, which requires time proprotional to the number of storage entries that account has. +There is also a special case to think of: if the balance of some account goes below `existential_deposit`, then all storage entries of that account will be erased, which requires time proportional to the number of storage entries that account has. **complexity**: `N` inserts into a `Map` or eventually into the storage (if committed). Every deleted account will induce removal of all its storage which is proportional to the number of storage entries that account has. From 4f096ac9d422f49ca2424fdd55821d2c7d22a924 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:46:24 +0100 Subject: [PATCH 041/201] instantiaion -> instantiation --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 7a40499230a34..42cbaa3a7c2af 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -494,7 +494,7 @@ decl_module! { /// The minimum amount required to generate a tombstone. const TombstoneDeposit: BalanceOf = T::TombstoneDeposit::get(); - /// Size of a contract at the time of instantiaion. This is a simple way to ensure that + /// Size of a contract at the time of instantiation. This is a simple way to ensure that /// empty contracts eventually gets deleted. const StorageSizeOffset: u32 = T::StorageSizeOffset::get(); From 2c98bc345f3438adc10a8153f6a12cd47f819ea6 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:49:32 +0100 Subject: [PATCH 042/201] commited -> committed --- frame/contracts/src/wasm/runtime.rs | 2 +- primitives/state-machine/src/overlayed_changes.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 74984c829eede..a84556d884ce9 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -716,7 +716,7 @@ define_env!(Env, , // Record a request to restore the caller contract to the specified contract. // // At the finalization stage, i.e. when all changes from the extrinsic that invoked this - // contract are commited, this function will compute a tombstone hash from the caller's + // contract are committed, this function will compute a tombstone hash from the caller's // storage and the given code hash and if the hash matches the hash found in the tombstone at // the specified address - kill the caller contract and restore the destination contract and set // the specified `rent_allowance`. All caller's funds are transferred to the destination. diff --git a/primitives/state-machine/src/overlayed_changes.rs b/primitives/state-machine/src/overlayed_changes.rs index 37187e163fe1c..6fcecb3c3675f 100644 --- a/primitives/state-machine/src/overlayed_changes.rs +++ b/primitives/state-machine/src/overlayed_changes.rs @@ -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) { From 5ce5cf02bab2eca24aeb5618d538cab81e845b76 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:51:00 +0100 Subject: [PATCH 043/201] tombstonedead -> tombstone --- frame/contracts/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 031e841c1c17b..664fed3a4d89f 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -1052,7 +1052,7 @@ fn claim_surcharge_malus() { } /// Claim surcharge with the given trigger_call at the given blocks. -/// if removes is true then assert that the contract is a tombstonedead +/// if removes is true then assert that the contract is a tombstone fn claim_surcharge(blocks: u64, trigger_call: impl Fn() -> bool, removes: bool) { let (wasm, code_hash) = compile_module::(CODE_SET_RENT).unwrap(); From 9a90deeb19445a83908aa4b359e05dec753605bc Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:51:46 +0100 Subject: [PATCH 044/201] uwnrap -> unwrap --- frame/identity/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/identity/src/lib.rs b/frame/identity/src/lib.rs index 5470e3d4b0831..341356394da88 100644 --- a/frame/identity/src/lib.rs +++ b/frame/identity/src/lib.rs @@ -627,7 +627,7 @@ decl_module! { /// - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as: /// /// ```nocompile - /// Self::registrars(reg_index).uwnrap().fee + /// Self::registrars(reg_index).unwrap().fee /// ``` /// /// Emits `JudgementRequested` if successful. From 6c87f101f6aefef08eb423319030eee44a4efa18 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:52:57 +0100 Subject: [PATCH 045/201] acount -> account --- frame/generic-asset/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/generic-asset/src/tests.rs b/frame/generic-asset/src/tests.rs index ad8fc2bf1bfb1..ceeacd54fb661 100644 --- a/frame/generic-asset/src/tests.rs +++ b/frame/generic-asset/src/tests.rs @@ -440,7 +440,7 @@ fn reserve_should_not_moves_amount_from_balance_to_reserved_balance() { // Then // - unreserved should return 20. #[test] -fn unreserve_should_return_substratced_value_from_unreserved_amount_by_actual_acount_balance() { +fn unreserve_should_return_substratced_value_from_unreserved_amount_by_actual_account_balance() { ExtBuilder::default().free_balance((1, 0, 100)).build().execute_with(|| { GenericAsset::set_reserved_balance(&1, &0, 100); assert_eq!(GenericAsset::unreserve(&1, &0, 120), 20); From ff1fe36b2fbb21d260c1ec1baa136b9a4bd561e6 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:53:53 +0100 Subject: [PATCH 046/201] specialised -> specialized --- client/keystore/src/lib.rs | 2 +- frame/collective/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/keystore/src/lib.rs b/client/keystore/src/lib.rs index ef81c40c10f51..92c8f4f9a5154 100644 --- a/client/keystore/src/lib.rs +++ b/client/keystore/src/lib.rs @@ -260,7 +260,7 @@ impl Store { /// Get public keys of all stored keys that match the key type. /// /// This will just use the type of the public key (a list of which to be returned) in order - /// to determine the key type. Unless you use a specialised application-type public key, then + /// to determine the key type. Unless you use a specialized application-type public key, then /// this only give you keys registered under generic cryptography, and will not return keys /// registered under the application type. pub fn public_keys(&self) -> Result> { diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index e9e6c75b836be..a3ea901a6fd24 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -15,7 +15,7 @@ // along with Substrate. If not, see . //! Collective system: Members of a set of account IDs can make their collective feelings known -//! through dispatched calls from one of two specialised origins. +//! through dispatched calls from one of two specialized origins. //! //! The membership can be provided in one of two ways: either directly, using the Root-dispatchable //! function `set_members`, or indirectly, through implementing the `ChangeMembers` From 008bbf1f1b043128237c5996a4fe868496dd3636 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:56:43 +0100 Subject: [PATCH 047/201] existant -> existent --- client/db/src/light.rs | 2 +- frame/treasury/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/db/src/light.rs b/client/db/src/light.rs index bea08d64676ee..14ce6ac0f9a05 100644 --- a/client/db/src/light.rs +++ b/client/db/src/light.rs @@ -815,7 +815,7 @@ pub(crate) mod tests { } #[test] - fn get_cht_fails_for_non_existant_cht() { + fn get_cht_fails_for_non_existent_cht() { let cht_size: u64 = cht::size(); assert!(LightStorage::::new_test().header_cht_root(cht_size, cht_size / 2).unwrap().is_none()); } diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index d2d07bfa4ab53..529686673bdc8 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -1052,14 +1052,14 @@ mod tests { } #[test] - fn reject_non_existant_spend_proposal_fails() { + fn reject_non_existent_spend_proposal_fails() { new_test_ext().execute_with(|| { assert_noop!(Treasury::reject_proposal(Origin::ROOT, 0), Error::::InvalidProposalIndex); }); } #[test] - fn accept_non_existant_spend_proposal_fails() { + fn accept_non_existent_spend_proposal_fails() { new_test_ext().execute_with(|| { assert_noop!(Treasury::approve_proposal(Origin::ROOT, 0), Error::::InvalidProposalIndex); }); From 29883cc96f69d797d0ff473f0c490833ebc8be02 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:58:48 +0100 Subject: [PATCH 048/201] requried -> required --- frame/membership/src/lib.rs | 2 +- frame/scored-pool/src/mock.rs | 2 +- frame/society/src/mock.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/membership/src/lib.rs b/frame/membership/src/lib.rs index 62d1315ee2988..c275bb783b4aa 100644 --- a/frame/membership/src/lib.rs +++ b/frame/membership/src/lib.rs @@ -233,7 +233,7 @@ mod tests { }; use sp_core::H256; // 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 sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup, BadOrigin}, testing::Header}; use frame_system::EnsureSignedBy; diff --git a/frame/scored-pool/src/mock.rs b/frame/scored-pool/src/mock.rs index 38a01a69afa80..cccb3c2b4cfb4 100644 --- a/frame/scored-pool/src/mock.rs +++ b/frame/scored-pool/src/mock.rs @@ -22,7 +22,7 @@ use std::cell::RefCell; use frame_support::{impl_outer_origin, parameter_types, weights::Weight, ord_parameter_types}; use sp_core::H256; // 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 sp_runtime::{ Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header, }; diff --git a/frame/society/src/mock.rs b/frame/society/src/mock.rs index 081d68ada4ce7..84b2343fae44e 100644 --- a/frame/society/src/mock.rs +++ b/frame/society/src/mock.rs @@ -21,7 +21,7 @@ use super::*; use frame_support::{impl_outer_origin, parameter_types, ord_parameter_types}; use sp_core::H256; // 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 sp_runtime::{ Perbill, testing::Header, From 0e26f065870a00c38091c376959fc612d6a861f6 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:58:58 +0100 Subject: [PATCH 049/201] Anull -> Annul --- frame/society/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/society/src/lib.rs b/frame/society/src/lib.rs index e803e54d4f7c1..38dc491b805b7 100644 --- a/frame/society/src/lib.rs +++ b/frame/society/src/lib.rs @@ -834,7 +834,7 @@ decl_module! { Self::deposit_event(RawEvent::Founded(founder)); } - /// Anull the founding of the society. + /// Annul the founding of the society. /// /// The dispatch origin for this call must be Signed, and the signing account must be both /// the `Founder` and the `Head`. This implies that it may only be done when there is one From 4d29d0f1f7a28eee33f043a758aefea814082202 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 15:59:43 +0100 Subject: [PATCH 050/201] AUTHORITES -> AUTHORITIES --- frame/grandpa/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/grandpa/src/lib.rs b/frame/grandpa/src/lib.rs index 6164e5ab4b1f5..3c7beb0ce2fba 100644 --- a/frame/grandpa/src/lib.rs +++ b/frame/grandpa/src/lib.rs @@ -154,7 +154,7 @@ decl_storage! { /// DEPRECATED /// /// This used to store the current authority set, which has been migrated to the well-known - /// GRANDPA_AUTHORITES_KEY unhashed key. + /// GRANDPA_AUTHORITIES_KEY unhashed key. #[cfg(feature = "migrate-authorities")] pub(crate) Authorities get(fn authorities): AuthorityList; From 12b10e1264c8aa4e06dc90237450e5bfce0f33ac Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:00:13 +0100 Subject: [PATCH 051/201] underyling -> underlying --- client/rpc-api/src/subscriptions.rs | 2 +- frame/grandpa/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/rpc-api/src/subscriptions.rs b/client/rpc-api/src/subscriptions.rs index 808c9d5ba4490..54881bad5123b 100644 --- a/client/rpc-api/src/subscriptions.rs +++ b/client/rpc-api/src/subscriptions.rs @@ -71,7 +71,7 @@ impl Subscriptions { /// Borrows the internal task executor. /// - /// This can be used to spawn additional tasks on the underyling event loop. + /// This can be used to spawn additional tasks on the underlying event loop. pub fn executor(&self) -> &TaskExecutor { &self.executor } diff --git a/frame/grandpa/src/lib.rs b/frame/grandpa/src/lib.rs index 3c7beb0ce2fba..6d3223f094859 100644 --- a/frame/grandpa/src/lib.rs +++ b/frame/grandpa/src/lib.rs @@ -435,7 +435,7 @@ impl pallet_session::OneSessionHandler for Module where I: Iterator { // Always issue a change if `session` says that the validators have changed. - // Even if their session keys are the same as before, the underyling economic + // Even if their session keys are the same as before, the underlying economic // identities have changed. let current_set_id = if changed { let next_authorities = validators.map(|(_, k)| (k, 1)).collect::>(); From fdc7b63d0db777811d65ad349c98ed748a4c4d98 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:01:02 +0100 Subject: [PATCH 052/201] recognisable -> recognizable --- frame/example/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index d048235ecc9f2..bf829415645ac 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -383,7 +383,7 @@ decl_event!( // - Unsigned calls that can be of two kinds: // * "Inherent extrinsics" that are opinions generally held by the block // authors that build child blocks. -// * Unsigned Transactions that are of intrinsic recognisable utility to the +// * Unsigned Transactions that are of intrinsic recognizable utility to the // network, and are validated by the runtime. // // Information about where this dispatch initiated from is provided as the first argument From ed3a1ff2f382adf77d507740a486fd103cbea50d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:01:53 +0100 Subject: [PATCH 053/201] Capitalise -> Capitalize --- frame/example/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index bf829415645ac..dbdc2efcf80b5 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -32,7 +32,7 @@ //! not the internals of the module implementation. Only state inputs, //! outputs, and a brief description that mentions whether calling it //! requires root, but without repeating the source code details. -//! Capitalise the first word of each documentation comment and end it with +//! Capitalize the first word of each documentation comment and end it with //! a full stop. See //! Generic example of annotating source code with documentation comments From 88e6b6efb4873ba8c1ab0e070a1012bd17c79286 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:04:06 +0100 Subject: [PATCH 054/201] reportfor -> report for --- frame/offences/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/offences/src/tests.rs b/frame/offences/src/tests.rs index 703361f77f9a1..f2f82cf7a87ee 100644 --- a/frame/offences/src/tests.rs +++ b/frame/offences/src/tests.rs @@ -98,7 +98,7 @@ fn should_report_in_different_time_slot() { }); // when - // reportfor the second time + // report for the second time offence.time_slot += 1; Offences::report_offence(vec![], offence); From 33d561046117195dfbe5f9c36ef5c1f86d32647a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:05:08 +0100 Subject: [PATCH 055/201] hearbeat -> heartbeat --- frame/im-online/src/lib.rs | 2 +- frame/im-online/src/tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index fe99d5eae39fb..d59c72aef3f5d 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -233,7 +233,7 @@ pub trait Trait: frame_system::Trait + pallet_session::historical::Trait { /// An expected duration of the session. /// /// This parameter is used to determine the longevity of `heartbeat` transaction - /// and a rough time when we should start considering sending hearbeats, + /// and a rough time when we should start considering sending heartbeats, /// since the workers avoids sending them at the very beginning of the session, assuming /// there is a chance the authority will produce a block and they won't be necessary. type SessionDuration: Get; diff --git a/frame/im-online/src/tests.rs b/frame/im-online/src/tests.rs index adc126094b612..808978d4036e8 100644 --- a/frame/im-online/src/tests.rs +++ b/frame/im-online/src/tests.rs @@ -328,7 +328,7 @@ fn should_not_send_a_report_if_already_online() { // then let transaction = pool_state.write().transactions.pop().unwrap(); - // All validators have `0` as their session key, but we should only produce 1 hearbeat. + // All validators have `0` as their session key, but we should only produce 1 heartbeat. assert_eq!(pool_state.read().transactions.len(), 0); // check stuff about the transaction. let ex: Extrinsic = Decode::decode(&mut &*transaction).unwrap(); From f47cd352ee3fa5bf3b85242cc8aca53c93f4f368 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:06:25 +0100 Subject: [PATCH 056/201] onlineness -> being online --- frame/im-online/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index d59c72aef3f5d..a050ad3d8a98d 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -369,7 +369,7 @@ decl_module! { type OffchainResult = Result::BlockNumber>>; /// Keep track of number of authored blocks per authority, uncles are counted as -/// well since they're a valid proof of onlineness. +/// well since they're a valid proof of being online. impl pallet_authorship::EventHandler for Module { fn note_author(author: T::ValidatorId) { Self::note_authorship(author); From 5130cbbbf76ff5fed6f8c33841c7ea447bebcf87 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:07:10 +0100 Subject: [PATCH 057/201] creater -> creator --- frame/generic-asset/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/generic-asset/src/lib.rs b/frame/generic-asset/src/lib.rs index 59535de4475b3..890b6a3914472 100644 --- a/frame/generic-asset/src/lib.rs +++ b/frame/generic-asset/src/lib.rs @@ -208,7 +208,7 @@ impl Subtrait for T { /// Asset creation options. #[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug)] pub struct AssetOptions { - /// Initial issuance of this asset. All deposit to the creater of the asset. + /// Initial issuance of this asset. All deposit to the creator of the asset. #[codec(compact)] pub initial_issuance: Balance, /// Which accounts are allowed to possess this asset. From 59f917a4068101201a8010bcee2cbcace7825d03 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:09:34 +0100 Subject: [PATCH 058/201] Bytearray -> Byte array --- frame/evm/src/backend.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/evm/src/backend.rs b/frame/evm/src/backend.rs index b6c3078a3339a..d72c8b785e346 100644 --- a/frame/evm/src/backend.rs +++ b/frame/evm/src/backend.rs @@ -29,7 +29,7 @@ pub struct Log { pub address: H160, /// Topics of the log. pub topics: Vec, - /// Bytearray data of the log. + /// Byte array data of the log. pub data: Vec, } From d3878c2a05a0522201de23f6ce0eb68e5776c7bf Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:10:01 +0100 Subject: [PATCH 059/201] Despoit -> Deposit --- frame/evm/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/evm/src/lib.rs b/frame/evm/src/lib.rs index a12d06c69b605..abf20114f2c6a 100644 --- a/frame/evm/src/lib.rs +++ b/frame/evm/src/lib.rs @@ -177,7 +177,7 @@ decl_module! { fn deposit_event() = default; - /// Despoit balance from currency/balances module into EVM. + /// Deposit balance from currency/balances module into EVM. #[weight = SimpleDispatchInfo::FixedNormal(10_000)] fn deposit_balance(origin, value: BalanceOf) { let sender = ensure_signed(origin)?; From 46a171291851f815430d5c5bc641a534d9f7e9c1 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:11:02 +0100 Subject: [PATCH 060/201] substratced -> subtracted --- frame/generic-asset/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/generic-asset/src/tests.rs b/frame/generic-asset/src/tests.rs index ceeacd54fb661..12758f2d96d9c 100644 --- a/frame/generic-asset/src/tests.rs +++ b/frame/generic-asset/src/tests.rs @@ -440,7 +440,7 @@ fn reserve_should_not_moves_amount_from_balance_to_reserved_balance() { // Then // - unreserved should return 20. #[test] -fn unreserve_should_return_substratced_value_from_unreserved_amount_by_actual_account_balance() { +fn unreserve_should_return_subtracted_value_from_unreserved_amount_by_actual_account_balance() { ExtBuilder::default().free_balance((1, 0, 100)).build().execute_with(|| { GenericAsset::set_reserved_balance(&1, &0, 100); assert_eq!(GenericAsset::unreserve(&1, &0, 120), 20); From 6ed57d1066b808d598f12ebfba292b7fc56563f7 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:12:22 +0100 Subject: [PATCH 061/201] Curent -> Current --- frame/metadata/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/metadata/src/lib.rs b/frame/metadata/src/lib.rs index a7410bbfbc3e4..5ecb9f3443876 100644 --- a/frame/metadata/src/lib.rs +++ b/frame/metadata/src/lib.rs @@ -33,7 +33,7 @@ use sp_core::RuntimeDebug; #[cfg(feature = "std")] type StringBuf = String; -/// Curent prefix of metadata +/// Current prefix of metadata pub const META_RESERVED: u32 = 0x6174656d; // 'meta' warn endianness /// On `no_std` we do not support `Decode` and thus `StringBuf` is just `&'static str`. From 4f9fd26e60e5daa4ae4159528138f072f8f80cf0 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:13:01 +0100 Subject: [PATCH 062/201] imbalanes -> imbalances --- frame/generic-asset/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/generic-asset/src/lib.rs b/frame/generic-asset/src/lib.rs index 890b6a3914472..233054dd9dccb 100644 --- a/frame/generic-asset/src/lib.rs +++ b/frame/generic-asset/src/lib.rs @@ -898,7 +898,7 @@ pub trait AssetIdProvider { fn asset_id() -> Self::AssetId; } -// wrapping these imbalanes in a private module is necessary to ensure absolute privacy +// wrapping these imbalances in a private module is necessary to ensure absolute privacy // of the inner member. mod imbalances { use super::{ From 3e22b6e7c26896f5b2c5c53660a2dce8cf584d9e Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:13:37 +0100 Subject: [PATCH 063/201] countfown -> countdown --- frame/treasury/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index 529686673bdc8..02543ce1e5d20 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -38,7 +38,7 @@ //! should be paid. //! //! A group of `Tippers` is determined through the config `Trait`. After half of these have declared -//! some amount that they believe a particular reported reason deserves, then a countfown period is +//! some amount that they believe a particular reported reason deserves, then a countdown period is //! entered where any remaining members can declare their tip amounts also. After the close of the //! countdown period, the median of all declared tips is paid to the reported beneficiary, along //! with any finders fee, in case of a public (and bonded) original report. From 52a0c80092329b1cae9f97e6dcb66a22763e8600 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:14:24 +0100 Subject: [PATCH 064/201] inexisting -> inexistent --- frame/treasury/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index 02543ce1e5d20..192dd1aff6116 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -1137,7 +1137,7 @@ mod tests { // In case treasury account is not existing then it works fine. // This is useful for chain that will just update runtime. #[test] - fn inexisting_account_works() { + fn inexistent_account_works() { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); pallet_balances::GenesisConfig::{ balances: vec![(0, 100), (1, 99), (2, 1)], From 9fda56ab5084f1976bc92e2505a7376cac86c3c2 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:14:52 +0100 Subject: [PATCH 065/201] additionaly -> additionally --- frame/system/src/offchain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/system/src/offchain.rs b/frame/system/src/offchain.rs index b26f4be4b45e0..507092f626dcf 100644 --- a/frame/system/src/offchain.rs +++ b/frame/system/src/offchain.rs @@ -68,7 +68,7 @@ pub trait Signer { /// A `Signer` implementation for any `AppPublic` type. /// -/// This implementation additionaly supports conversion to/from multi-signature/multi-signer +/// This implementation additionally supports conversion to/from multi-signature/multi-signer /// wrappers. /// If the wrapped crypto doesn't match `AppPublic`s crypto `None` is returned. impl Signer for TAnyAppPublic where From 347261fb6644a389172c22bffc758ede2100906b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:17:26 +0100 Subject: [PATCH 066/201] substracted -> subtracted --- frame/generic-asset/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/generic-asset/src/tests.rs b/frame/generic-asset/src/tests.rs index 12758f2d96d9c..d5c0a877dfe75 100644 --- a/frame/generic-asset/src/tests.rs +++ b/frame/generic-asset/src/tests.rs @@ -553,7 +553,7 @@ fn slash_reserved_should_return_none() { // Then // - Should not return None. #[test] -fn repatriate_reserved_return_amount_substracted_by_slash_amount() { +fn repatriate_reserved_return_amount_subtracted_by_slash_amount() { ExtBuilder::default().build().execute_with(|| { GenericAsset::set_reserved_balance(&1, &0, 100); assert_eq!(GenericAsset::repatriate_reserved(&1, &0, &1, 130, BalanceStatus::Free), 30); From 222d7de79f097bda4518a995bda62fbc19542dd9 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:17:51 +0100 Subject: [PATCH 067/201] auxilary -> auxiliary --- frame/offences/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/offences/src/lib.rs b/frame/offences/src/lib.rs index ea6f96cbc3ca4..7831ba65a3b06 100644 --- a/frame/offences/src/lib.rs +++ b/frame/offences/src/lib.rs @@ -187,7 +187,7 @@ struct TriageOutcome { concurrent_offenders: Vec>, } -/// An auxilary struct for working with storage of indexes localized for a specific offence +/// An auxiliary struct for working with storage of indexes localized for a specific offence /// kind (specified by the `O` type parameter). /// /// This struct is responsible for aggregating storage writes and the underlying storage should not From f09eb81079d7f86e20d24bdbe8a7a36e11c9e61d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:19:31 +0100 Subject: [PATCH 068/201] parital -> partial --- frame/randomness-collective-flip/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/randomness-collective-flip/src/lib.rs b/frame/randomness-collective-flip/src/lib.rs index d35025546c15c..53d640688ef7d 100644 --- a/frame/randomness-collective-flip/src/lib.rs +++ b/frame/randomness-collective-flip/src/lib.rs @@ -231,7 +231,7 @@ mod tests { } #[test] - fn test_random_material_parital() { + fn test_random_material_partial() { new_test_ext().execute_with(|| { let genesis_hash = System::parent_hash(); From 857271fb34ee433eec8c57d4d5ee0decd6366611 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:21:03 +0100 Subject: [PATCH 069/201] in't -> isn't --- frame/nicks/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/nicks/src/lib.rs b/frame/nicks/src/lib.rs index 6a86f08093bdb..16797ffdef56a 100644 --- a/frame/nicks/src/lib.rs +++ b/frame/nicks/src/lib.rs @@ -104,7 +104,7 @@ decl_error! { TooShort, /// A name is too long. TooLong, - /// An account in't named. + /// An account isn't named. Unnamed, } } From 92864a1b93f4e30f36833f309b2ef83ff462e6e4 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:23:25 +0100 Subject: [PATCH 070/201] compatability -> compatibility --- primitives/block-builder/src/lib.rs | 4 ++-- primitives/blockchain/src/error.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/primitives/block-builder/src/lib.rs b/primitives/block-builder/src/lib.rs index d963fb7e3067e..f050979bd8ecb 100644 --- a/primitives/block-builder/src/lib.rs +++ b/primitives/block-builder/src/lib.rs @@ -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: ::Extrinsic) - -> self::compatability_v3::ApplyResult; + -> self::compatibility_v3::ApplyResult; /// Apply the given extrinsic. /// diff --git a/primitives/blockchain/src/error.rs b/primitives/blockchain/src/error.rs index 24872448ab6f2..67123a29cb9b1 100644 --- a/primitives/blockchain/src/error.rs +++ b/primitives/blockchain/src/error.rs @@ -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; @@ -151,9 +151,9 @@ impl<'a> From<&'a str> for Error { } #[allow(deprecated)] -impl From for ApplyExtrinsicFailed { - fn from(e: compatability_v3::ApplyError) -> Self { - use self::compatability_v3::ApplyError::*; +impl From 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)), From a51701c885145d61fed07da9eda9a29da84d43e4 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:24:32 +0100 Subject: [PATCH 071/201] infomation -> information --- primitives/arithmetic/fuzzer/src/biguint.rs | 2 +- primitives/arithmetic/fuzzer/src/rational128.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/arithmetic/fuzzer/src/biguint.rs b/primitives/arithmetic/fuzzer/src/biguint.rs index 1e2ec2a502b56..f217b080d25fa 100644 --- a/primitives/arithmetic/fuzzer/src/biguint.rs +++ b/primitives/arithmetic/fuzzer/src/biguint.rs @@ -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/). diff --git a/primitives/arithmetic/fuzzer/src/rational128.rs b/primitives/arithmetic/fuzzer/src/rational128.rs index 60aa315c18aee..586a165272244 100644 --- a/primitives/arithmetic/fuzzer/src/rational128.rs +++ b/primitives/arithmetic/fuzzer/src/rational128.rs @@ -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/). From 00649a116f5342c4215ac493565d379bb21bc759 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:27:16 +0100 Subject: [PATCH 072/201] etected -> detected --- primitives/transaction-pool/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/transaction-pool/src/error.rs b/primitives/transaction-pool/src/error.rs index ecce202d7d879..1a456ca4fd03c 100644 --- a/primitives/transaction-pool/src/error.rs +++ b/primitives/transaction-pool/src/error.rs @@ -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. From 45cda28454ca816d2750e78e2d3020d0f8a276b9 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:28:47 +0100 Subject: [PATCH 073/201] extrinsiscs -> extrinsics --- primitives/state-machine/src/changes_trie/mod.rs | 2 +- primitives/state-machine/src/overlayed_changes.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/state-machine/src/changes_trie/mod.rs b/primitives/state-machine/src/changes_trie/mod.rs index 12074b7261aa5..a5e6758debcbc 100644 --- a/primitives/state-machine/src/changes_trie/mod.rs +++ b/primitives/state-machine/src/changes_trie/mod.rs @@ -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. //! diff --git a/primitives/state-machine/src/overlayed_changes.rs b/primitives/state-machine/src/overlayed_changes.rs index 6fcecb3c3675f..421d3ebc23c76 100644 --- a/primitives/state-machine/src/overlayed_changes.rs +++ b/primitives/state-machine/src/overlayed_changes.rs @@ -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, } From b03603fcc42812549bc9555840909e4276393c8d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:29:14 +0100 Subject: [PATCH 074/201] reprensentation -> representation --- primitives/state-machine/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/state-machine/src/lib.rs b/primitives/state-machine/src/lib.rs index bb62df6da4905..bb2bb2c52c86f 100644 --- a/primitives/state-machine/src/lib.rs +++ b/primitives/state-machine/src/lib.rs @@ -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( &mut self, From a4061bdbfd3990ea067a6b9f974392437a368005 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:29:39 +0100 Subject: [PATCH 075/201] coonfiguration -> configuration --- primitives/state-machine/src/changes_trie/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/state-machine/src/changes_trie/mod.rs b/primitives/state-machine/src/changes_trie/mod.rs index a5e6758debcbc..d614992df3033 100644 --- a/primitives/state-machine/src/changes_trie/mod.rs +++ b/primitives/state-machine/src/changes_trie/mod.rs @@ -130,7 +130,7 @@ pub struct AnchorBlockId { 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, From 3d6552f99044e44817c5c097416f7e0733ff6952 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:30:42 +0100 Subject: [PATCH 076/201] primtives -> primitives --- primitives/blockchain/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/blockchain/src/lib.rs b/primitives/blockchain/src/lib.rs index 21c5bc99d20cf..422d8c5a0188b 100644 --- a/primitives/blockchain/src/lib.rs +++ b/primitives/blockchain/src/lib.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Substrate blockchain traits and primtives +//! Substrate blockchain traits and primitives mod backend; mod header_metadata; From be564c056ac735e30bb084a97b10c671b1b2383d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:31:41 +0100 Subject: [PATCH 077/201] miscelanious -> miscellaneous --- primitives/blockchain/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/blockchain/src/error.rs b/primitives/blockchain/src/error.rs index 67123a29cb9b1..ece20d1cf8586 100644 --- a/primitives/blockchain/src/error.rs +++ b/primitives/blockchain/src/error.rs @@ -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)] From 3882146545e29f830c5c7a1e8fc851c682f51dea Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:33:45 +0100 Subject: [PATCH 078/201] VERISON -> VERSION --- primitives/finality-grandpa/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/primitives/finality-grandpa/src/lib.rs b/primitives/finality-grandpa/src/lib.rs index 205fce0ce3fbd..9dcb1c2363c15 100644 --- a/primitives/finality-grandpa/src/lib.rs +++ b/primitives/finality-grandpa/src/lib.rs @@ -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 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>(&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(value: &mut I) -> Result { 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()) From 0d9b625d0f721d5c0662ad64d13ed5520c9a699f Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:34:10 +0100 Subject: [PATCH 079/201] endcoded -> encoded --- primitives/externalities/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/externalities/src/lib.rs b/primitives/externalities/src/lib.rs index 75193a4b9c392..431e449846c6e 100644 --- a/primitives/externalities/src/lib.rs +++ b/primitives/externalities/src/lib.rs @@ -196,7 +196,7 @@ pub trait Externalities: ExtensionStore { ) -> Vec; /// 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`. /// From 332989e79e9bbfff69b6d43ab3b3e128b6752531 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:35:00 +0100 Subject: [PATCH 080/201] Genrates -> Generates --- primitives/core/src/testing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/core/src/testing.rs b/primitives/core/src/testing.rs index 0def3454bc899..247323f9703b4 100644 --- a/primitives/core/src/testing.rs +++ b/primitives/core/src/testing.rs @@ -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) From a622c0c9cf56268536fb1746925f7fbfd40e566e Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:35:33 +0100 Subject: [PATCH 081/201] miliseconds -> milliseconds --- primitives/core/src/offchain/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/core/src/offchain/mod.rs b/primitives/core/src/offchain/mod.rs index 425957a21f67e..d0c1b41691e51 100644 --- a/primitives/core/src/offchain/mod.rs +++ b/primitives/core/src/offchain/mod.rs @@ -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) } From 00df8f3543948c55be328d252e3ade9a120b0b91 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:36:15 +0100 Subject: [PATCH 082/201] occured -> occurred --- client/executor/common/src/error.rs | 2 +- client/network/src/protocol/event.rs | 2 +- client/rpc-api/src/errors.rs | 2 +- primitives/core/src/offchain/mod.rs | 2 +- primitives/sandbox/src/lib.rs | 2 +- utils/fork-tree/src/lib.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/executor/common/src/error.rs b/client/executor/common/src/error.rs index b8d40d4d91f15..66d520e942411 100644 --- a/client/executor/common/src/error.rs +++ b/client/executor/common/src/error.rs @@ -27,7 +27,7 @@ pub type Result = std::result::Result; pub enum Error { /// Unserializable Data InvalidData(sp_serializer::Error), - /// Trap occured during execution + /// Trap occurred during execution Trap(wasmi::Trap), /// Wasmi loading/instantiating error Wasmi(wasmi::Error), diff --git a/client/network/src/protocol/event.rs b/client/network/src/protocol/event.rs index e239e9d983182..78490863be9c2 100644 --- a/client/network/src/protocol/event.rs +++ b/client/network/src/protocol/event.rs @@ -36,7 +36,7 @@ pub enum DhtEvent { /// The record has been successfully inserted into the DHT. ValuePut(Key), - /// An error has occured while putting a record into the DHT. + /// An error has occurred while putting a record into the DHT. ValuePutFailed(Key), } diff --git a/client/rpc-api/src/errors.rs b/client/rpc-api/src/errors.rs index 9db41d0497068..b75c34ead3806 100644 --- a/client/rpc-api/src/errors.rs +++ b/client/rpc-api/src/errors.rs @@ -20,7 +20,7 @@ pub fn internal(e: E) -> jsonrpc_core::Error { warn!("Unknown error: {:?}", e); jsonrpc_core::Error { code: jsonrpc_core::ErrorCode::InternalError, - message: "Unknown error occured".into(), + message: "Unknown error occurred".into(), data: Some(format!("{:?}", e).into()), } } diff --git a/primitives/core/src/offchain/mod.rs b/primitives/core/src/offchain/mod.rs index d0c1b41691e51..67ffa67450847 100644 --- a/primitives/core/src/offchain/mod.rs +++ b/primitives/core/src/offchain/mod.rs @@ -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 diff --git a/primitives/sandbox/src/lib.rs b/primitives/sandbox/src/lib.rs index e7cd684b458a4..1ef30ca5dbd8e 100755 --- a/primitives/sandbox/src/lib.rs +++ b/primitives/sandbox/src/lib.rs @@ -193,7 +193,7 @@ impl Instance { /// - 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, diff --git a/utils/fork-tree/src/lib.rs b/utils/fork-tree/src/lib.rs index 8ce0b729c67c9..8e1918fed98ec 100644 --- a/utils/fork-tree/src/lib.rs +++ b/utils/fork-tree/src/lib.rs @@ -23,7 +23,7 @@ use std::cmp::Reverse; use std::fmt; use codec::{Decode, Encode}; -/// Error occured when iterating with the tree. +/// Error occurred when iterating with the tree. #[derive(Clone, Debug, PartialEq)] pub enum Error { /// Adding duplicate node to tree. From 5aaef4667272f2c485c863895671e49d03786d07 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:36:37 +0100 Subject: [PATCH 083/201] trully -> truely --- primitives/core/src/offchain/mod.rs | 2 +- primitives/io/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/core/src/offchain/mod.rs b/primitives/core/src/offchain/mod.rs index 67ffa67450847..7df11d154221b 100644 --- a/primitives/core/src/offchain/mod.rs +++ b/primitives/core/src/offchain/mod.rs @@ -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 truely random non deterministic seed generated by host environment. /// Obviously fine in the off-chain worker context. fn random_seed(&mut self) -> [u8; 32]; diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index ce8a546e86ff8..44a3c851966aa 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -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 truely 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::() From 2f860510a76c588da1a447d9659f1ccb7e2815ee Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:37:18 +0100 Subject: [PATCH 084/201] truely -> truly --- primitives/core/src/offchain/mod.rs | 2 +- primitives/io/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/core/src/offchain/mod.rs b/primitives/core/src/offchain/mod.rs index 7df11d154221b..c393b0f9f8882 100644 --- a/primitives/core/src/offchain/mod.rs +++ b/primitives/core/src/offchain/mod.rs @@ -335,7 +335,7 @@ pub trait Externalities: Send { /// Returns a random seed. /// - /// This is a truely 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]; diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index 44a3c851966aa..715091e3e269b 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -594,7 +594,7 @@ pub trait Offchain { /// Returns a random seed. /// - /// This is a truely 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::() From 845924cbb08abe1a75fe169fd73cf280d6948644 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:38:12 +0100 Subject: [PATCH 085/201] conjuction -> conjunction --- primitives/core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index b1a5916c921f1..f8c48ee970926 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -201,7 +201,7 @@ impl PartialEq for NativeOrEncoded { } /// 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 {} From a783d16d35fdadd93ec6749893c9e3849906daf0 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:42:18 +0100 Subject: [PATCH 086/201] encouters -> encounters --- primitives/inherents/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/inherents/src/lib.rs b/primitives/inherents/src/lib.rs index f1b8db982d337..e8df2c49e5193 100644 --- a/primitives/inherents/src/lib.rs +++ b/primitives/inherents/src/lib.rs @@ -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 { From 2be2cff14ff3951d0c377a2c23c3cc8cd21b99f7 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:43:27 +0100 Subject: [PATCH 087/201] customised -> customized --- primitives/consensus/common/src/select_chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/consensus/common/src/select_chain.rs b/primitives/consensus/common/src/select_chain.rs index 3ce2c6ccd0ec9..8acaf2873b32f 100644 --- a/primitives/consensus/common/src/select_chain.rs +++ b/primitives/consensus/common/src/select_chain.rs @@ -22,7 +22,7 @@ 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 /// `_authoring`-functions must be implemented. From 102e62a8277df581a23b222d2adbc61c49604f41 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:44:20 +0100 Subject: [PATCH 088/201] deterministicly -> deterministically --- primitives/consensus/common/src/select_chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/consensus/common/src/select_chain.rs b/primitives/consensus/common/src/select_chain.rs index 8acaf2873b32f..0b8ff5fab6e8e 100644 --- a/primitives/consensus/common/src/select_chain.rs +++ b/primitives/consensus/common/src/select_chain.rs @@ -31,7 +31,7 @@ use sp_runtime::traits::{Block as BlockT, NumberFor}; /// 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 finalising chains may only use the `_authoring` functions. pub trait SelectChain: Sync + Send + Clone { /// Get all leaves of the chain: block hashes that have no children currently. From f5267410d3f403067905c79273ae1b45d54b1e83 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:44:46 +0100 Subject: [PATCH 089/201] finalisation -> finalization --- primitives/consensus/common/src/select_chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/consensus/common/src/select_chain.rs b/primitives/consensus/common/src/select_chain.rs index 0b8ff5fab6e8e..7e858c37b7d54 100644 --- a/primitives/consensus/common/src/select_chain.rs +++ b/primitives/consensus/common/src/select_chain.rs @@ -24,7 +24,7 @@ use sp_runtime::traits::{Block as BlockT, NumberFor}; /// /// 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 From f08db9841dc49d8383208c834ec1c3bbbf00e0df Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:45:56 +0100 Subject: [PATCH 090/201] pluggable -> plugable --- client/src/client.rs | 2 +- primitives/consensus/common/src/import_queue/basic_queue.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/client.rs b/client/src/client.rs index 435b112616503..e9a8f1228c5e1 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -1192,7 +1192,7 @@ impl Client where // NOTE: we're setting the finalized block as best block, this might // be slightly inaccurate since we might have a "better" block // further along this chain, but since best chain selection logic is - // pluggable we cannot make a better choice here. usages that need + // plugable we cannot make a better choice here. usages that need // an accurate "best" block need to go through `SelectChain` // instead. operation.op.mark_head(BlockId::Hash(block))?; diff --git a/primitives/consensus/common/src/import_queue/basic_queue.rs b/primitives/consensus/common/src/import_queue/basic_queue.rs index 63ba16b658c01..56ce6d64d64bc 100644 --- a/primitives/consensus/common/src/import_queue/basic_queue.rs +++ b/primitives/consensus/common/src/import_queue/basic_queue.rs @@ -28,7 +28,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 { /// Channel to send messages to the background task. sender: mpsc::UnboundedSender>, From 30af30e4daaa1e2ee3b1806787cf4de6e284f886 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:46:38 +0100 Subject: [PATCH 091/201] wakeup -> wake-up --- primitives/consensus/common/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/consensus/common/src/error.rs b/primitives/consensus/common/src/error.rs index c802831d6501f..d7e396223a2c5 100644 --- a/primitives/consensus/common/src/error.rs +++ b/primitives/consensus/common/src/error.rs @@ -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. From ef0b27dddc266dcde85f7420388f1ff363f4693d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:47:23 +0100 Subject: [PATCH 092/201] interemdiate -> intermediate --- primitives/consensus/common/src/block_import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/consensus/common/src/block_import.rs b/primitives/consensus/common/src/block_import.rs index dabe6331e8150..2e3965252b172 100644 --- a/primitives/consensus/common/src/block_import.rs +++ b/primitives/consensus/common/src/block_import.rs @@ -226,7 +226,7 @@ impl BlockImportParams { } } - /// 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(&mut self, key: &[u8]) -> Result, Error> { let (k, v) = self.intermediates.remove_entry(key).ok_or(Error::NoIntermediate)?; From 565965bef852c428f10ad1cabe6d600602fd02ef Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:48:44 +0100 Subject: [PATCH 093/201] intepreting -> interpreting --- primitives/std/without_std.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/std/without_std.rs b/primitives/std/without_std.rs index 4424ca0e7de68..6b28f66b43bff 100755 --- a/primitives/std/without_std.rs +++ b/primitives/std/without_std.rs @@ -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 From d9c4959c8800d684f642bfac6d88d0ff0f96296f Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:49:22 +0100 Subject: [PATCH 094/201] finalzied -> finalized --- primitives/transaction-pool/src/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/transaction-pool/src/pool.rs b/primitives/transaction-pool/src/pool.rs index 8d8ff47cbe3d9..b6d2d15c838a6 100644 --- a/primitives/transaction-pool/src/pool.rs +++ b/primitives/transaction-pool/src/pool.rs @@ -249,7 +249,7 @@ pub enum ChainEvent { /// List of retracted blocks ordered by block number. retracted: Vec, }, - /// An existing block has been finalzied. + /// An existing block has been finalized. Finalized { /// Hash of just finalized block hash: B::Hash, From 08fbfa98f61a9bcbf716d14f77cb4df39181127e Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:49:56 +0100 Subject: [PATCH 095/201] throgh -> through --- primitives/state-machine/src/proving_backend.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/state-machine/src/proving_backend.rs b/primitives/state-machine/src/proving_backend.rs index 70124927fdd2e..672ec6ea794e4 100644 --- a/primitives/state-machine/src/proving_backend.rs +++ b/primitives/state-machine/src/proving_backend.rs @@ -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()); From 429000c66462bf7982f7e5b0eaa293b7fd8e1e33 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:50:24 +0100 Subject: [PATCH 096/201] extinsic -> extrinsic --- primitives/state-machine/src/overlayed_changes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/state-machine/src/overlayed_changes.rs b/primitives/state-machine/src/overlayed_changes.rs index 421d3ebc23c76..4eb44de7c5862 100644 --- a/primitives/state-machine/src/overlayed_changes.rs +++ b/primitives/state-machine/src/overlayed_changes.rs @@ -65,7 +65,7 @@ pub struct OverlayedChanges { pub struct OverlayedValue { /// Current value. None if value has been deleted. pub value: Option, - /// 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>, } From 212b5da00fa7dd2d57648050cb3ecef1a8028599 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:52:07 +0100 Subject: [PATCH 097/201] convient -> convenient --- primitives/rpc/src/list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/rpc/src/list.rs b/primitives/rpc/src/list.rs index b8b7c537c4c4c..469eae3d1479a 100644 --- a/primitives/rpc/src/list.rs +++ b/primitives/rpc/src/list.rs @@ -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 From 527906aa4f66b5a7c983f306364da3733d78075c Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:53:14 +0100 Subject: [PATCH 098/201] allocater -> allocator --- primitives/allocator/src/freeing_bump.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/allocator/src/freeing_bump.rs b/primitives/allocator/src/freeing_bump.rs index 12fa492b8d40a..0d15ed11f74e0 100644 --- a/primitives/allocator/src/freeing_bump.rs +++ b/primitives/allocator/src/freeing_bump.rs @@ -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. //! From 676f876ec25b44692aa49b0f5d74093b2d20b498 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:56:34 +0100 Subject: [PATCH 099/201] propagateable -> propagatable --- client/offchain/src/lib.rs | 2 +- client/service/src/lib.rs | 2 +- client/transaction-pool/graph/src/base_pool.rs | 6 +++--- primitives/transaction-pool/src/pool.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/offchain/src/lib.rs b/client/offchain/src/lib.rs index fadfaa01349e0..e0da76d31f52c 100644 --- a/client/offchain/src/lib.rs +++ b/client/offchain/src/lib.rs @@ -217,6 +217,6 @@ mod tests { // then assert_eq!(pool.0.status().ready, 1); - assert_eq!(pool.0.ready().next().unwrap().is_propagateable(), false); + assert_eq!(pool.0.ready().next().unwrap().is_propagatable(), false); } } diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 8c2f57dd7cb4f..0745b4d32a09d 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -625,7 +625,7 @@ where E: IntoPoolError + From, { pool.ready() - .filter(|t| t.is_propagateable()) + .filter(|t| t.is_propagatable()) .map(|t| { let hash = t.hash().clone(); let ex: B::Extrinsic = t.data().clone(); diff --git a/client/transaction-pool/graph/src/base_pool.rs b/client/transaction-pool/graph/src/base_pool.rs index 8a33d8244eb00..d10ecf450afa9 100644 --- a/client/transaction-pool/graph/src/base_pool.rs +++ b/client/transaction-pool/graph/src/base_pool.rs @@ -138,7 +138,7 @@ impl InPoolTransaction for Transaction { &self.provides } - fn is_propagateable(&self) -> bool { + fn is_propagatable(&self) -> bool { self.propagate } } @@ -1058,7 +1058,7 @@ requires: [03,02], provides: [04], data: [4]}".to_owned() requires: vec![vec![3], vec![2]], provides: vec![vec![4]], propagate: true, - }.is_propagateable(), true); + }.is_propagatable(), true); assert_eq!(Transaction { data: vec![4u8], @@ -1069,7 +1069,7 @@ requires: [03,02], provides: [04], data: [4]}".to_owned() requires: vec![vec![3], vec![2]], provides: vec![vec![4]], propagate: false, - }.is_propagateable(), false); + }.is_propagatable(), false); } #[test] diff --git a/primitives/transaction-pool/src/pool.rs b/primitives/transaction-pool/src/pool.rs index b6d2d15c838a6..c2623324bcf70 100644 --- a/primitives/transaction-pool/src/pool.rs +++ b/primitives/transaction-pool/src/pool.rs @@ -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_propagatable(&self) -> bool; } /// Transaction pool interface. From a11a494b500a3e2ac7788bc38e618757ca63bad1 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:58:47 +0100 Subject: [PATCH 100/201] succesfuly -> successfully --- primitives/runtime/src/offchain/storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/runtime/src/offchain/storage.rs b/primitives/runtime/src/offchain/storage.rs index d5c2b47298450..b9aab82333683 100644 --- a/primitives/runtime/src/offchain/storage.rs +++ b/primitives/runtime/src/offchain/storage.rs @@ -65,7 +65,7 @@ impl<'a> StorageValueRef<'a> { /// /// 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(&self, f: F) -> Result, E> where From 4a13854b9db70faee46a9b15afb89c8c4e239a60 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 16:59:40 +0100 Subject: [PATCH 101/201] finalising -> finalizing --- primitives/consensus/common/src/select_chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/consensus/common/src/select_chain.rs b/primitives/consensus/common/src/select_chain.rs index 7e858c37b7d54..d94511c11027a 100644 --- a/primitives/consensus/common/src/select_chain.rs +++ b/primitives/consensus/common/src/select_chain.rs @@ -31,7 +31,7 @@ use sp_runtime::traits::{Block as BlockT, NumberFor}; /// or author through the using the right function call, as these might differ in /// some implementations. /// -/// Non-deterministically finalising chains may only use the `_authoring` functions. +/// Non-deterministically finalizing chains may only use the `_authoring` functions. pub trait SelectChain: Sync + Send + Clone { /// Get all leaves of the chain: block hashes that have no children currently. From b5d21b720a0774320bf2fc4b6c64e47530444927 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:00:27 +0100 Subject: [PATCH 102/201] publically -> publicly --- primitives/core/src/crypto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/core/src/crypto.rs b/primitives/core/src/crypto.rs index 5ad5e1981379b..3833c8a912cec 100644 --- a/primitives/core/src/crypto.rs +++ b/primitives/core/src/crypto.rs @@ -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 From 3052ba9d8fe0c4e6d34fcdb01e98b1d9767dad74 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:01:54 +0100 Subject: [PATCH 103/201] phrasee -> phrase --- primitives/core/src/ed25519.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/core/src/ed25519.rs b/primitives/core/src/ed25519.rs index f3aba47c20457..5e04dcceffb39 100644 --- a/primitives/core/src/ed25519.rs +++ b/primitives/core/src/ed25519.rs @@ -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") } From d77a039bea7f2faf81b02614c1e2cbcefb18f3ed Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:02:58 +0100 Subject: [PATCH 104/201] substration -> substractions --- primitives/runtime/src/curve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/runtime/src/curve.rs b/primitives/runtime/src/curve.rs index a230e2f32d56f..96544dc554258 100644 --- a/primitives/runtime/src/curve.rs +++ b/primitives/runtime/src/curve.rs @@ -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 substractions 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 From 3f82fb51afe114ead0384f8238ebfe275603ebfb Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:03:28 +0100 Subject: [PATCH 105/201] substractions -> subtractions --- primitives/runtime/src/curve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/runtime/src/curve.rs b/primitives/runtime/src/curve.rs index 96544dc554258..e04ce77fb2cbb 100644 --- a/primitives/runtime/src/curve.rs +++ b/primitives/runtime/src/curve.rs @@ -65,7 +65,7 @@ impl<'a> PiecewiseLinear<'a> { next.0.deconstruct().saturating_sub(prev.0.deconstruct()), ); - // If both substractions 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 From dae22d2e16f26b686655bf8f3b7e319339ae70d3 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:03:56 +0100 Subject: [PATCH 106/201] neccessarily -> necessarily --- primitives/runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index 4564effe488f1..4d6739bb134e8 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -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. From 4547e649633c4cb20cfa1ef2bdeba710714aaef5 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:04:22 +0100 Subject: [PATCH 107/201] Inlucde -> Include --- primitives/runtime-interface/test-wasm/src/lib.rs | 2 +- test-utils/runtime/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/runtime-interface/test-wasm/src/lib.rs b/primitives/runtime-interface/test-wasm/src/lib.rs index 467f58cb30c7c..4e99c0f06c199 100644 --- a/primitives/runtime-interface/test-wasm/src/lib.rs +++ b/primitives/runtime-interface/test-wasm/src/lib.rs @@ -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")); diff --git a/test-utils/runtime/src/lib.rs b/test-utils/runtime/src/lib.rs index c8dff15ef20ce..e01da8a9fcd0c 100644 --- a/test-utils/runtime/src/lib.rs +++ b/test-utils/runtime/src/lib.rs @@ -55,7 +55,7 @@ use sp_core::storage::ChildType; pub use sp_consensus_babe::AuthorityId; pub type AuraId = sp_consensus_aura::sr25519::AuthorityId; -// Inlucde the WASM binary +// Include the WASM binary #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); From 65fcffc7d05c0886618a494649543dec020e8256 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:05:04 +0100 Subject: [PATCH 108/201] unefficient -> inefficient --- primitives/trie/src/node_header.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/trie/src/node_header.rs b/primitives/trie/src/node_header.rs index edcd28a568bcd..7aa16292549ed 100644 --- a/primitives/trie/src/node_header.rs +++ b/primitives/trie/src/node_header.rs @@ -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 { let size = sp_std::cmp::min(trie_constants::NIBBLE_SIZE_BOUND, size); From 02fd8faafc1f808475f3f793ad091172621fd015 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:05:44 +0100 Subject: [PATCH 109/201] thay -> they --- primitives/state-machine/src/backend.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/state-machine/src/backend.rs b/primitives/state-machine/src/backend.rs index 396ef6575af07..ca6612a5e92dd 100644 --- a/primitives/state-machine/src/backend.rs +++ b/primitives/state-machine/src/backend.rs @@ -209,7 +209,7 @@ pub trait Backend: 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() } From ca5fa46a2ad10efa30340520ab93c09a7627610f Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:09:55 +0100 Subject: [PATCH 110/201] funtion -> function --- bin/node-template/pallets/template/src/lib.rs | 2 +- bin/node-template/pallets/template/src/tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/node-template/pallets/template/src/lib.rs b/bin/node-template/pallets/template/src/lib.rs index a1615b4c1f0bc..aa4d2cbc994d3 100644 --- a/bin/node-template/pallets/template/src/lib.rs +++ b/bin/node-template/pallets/template/src/lib.rs @@ -41,7 +41,7 @@ decl_event!( pub enum Event where AccountId = ::AccountId { /// Just a dummy event. /// Event `Something` is declared with a parameter of the type `u32` and `AccountId` - /// To emit this event, we call the deposit funtion, from our runtime funtions + /// To emit this event, we call the deposit function, from our runtime functions SomethingStored(u32, AccountId), } ); diff --git a/bin/node-template/pallets/template/src/tests.rs b/bin/node-template/pallets/template/src/tests.rs index 44a423c948fbf..ec123a50c7cc9 100644 --- a/bin/node-template/pallets/template/src/tests.rs +++ b/bin/node-template/pallets/template/src/tests.rs @@ -6,7 +6,7 @@ use frame_support::{assert_ok, assert_noop}; #[test] fn it_works_for_default_value() { new_test_ext().execute_with(|| { - // Just a dummy test for the dummy funtion `do_something` + // Just a dummy test for the dummy function `do_something` // calling the `do_something` function with a value 42 assert_ok!(TemplateModule::do_something(Origin::signed(1), 42)); // asserting that the stored value is equal to what we stored From 819f95c0eb6bbb44a7009340761e39a77223a5a9 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:10:37 +0100 Subject: [PATCH 111/201] datastructures -> data structures --- bin/node-template/runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs index 04394917f14fd..a3da0145eb307 100644 --- a/bin/node-template/runtime/src/lib.rs +++ b/bin/node-template/runtime/src/lib.rs @@ -69,7 +69,7 @@ pub type DigestItem = generic::DigestItem; /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know /// the specifics of the runtime. They can then be made to be agnostic over specific formats /// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core datastructures. +/// to even the core data structures. pub mod opaque { use super::*; From e7460d9a5499579320fe2ff24c4f1423ac2e6275 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:10:55 +0100 Subject: [PATCH 112/201] infromation -> information --- bin/node-template/runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs index a3da0145eb307..342d7f0926bc3 100644 --- a/bin/node-template/runtime/src/lib.rs +++ b/bin/node-template/runtime/src/lib.rs @@ -109,7 +109,7 @@ pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); pub const HOURS: BlockNumber = MINUTES * 60; pub const DAYS: BlockNumber = HOURS * 24; -/// The version infromation used to identify this runtime when compiled natively. +/// The version information used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { NativeVersion { From 805f725f28db2655beb51726499ef00718a3d361 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:13:38 +0100 Subject: [PATCH 113/201] propagatable -> propagable --- client/offchain/src/lib.rs | 2 +- client/service/src/lib.rs | 2 +- client/transaction-pool/graph/src/base_pool.rs | 6 +++--- primitives/transaction-pool/src/pool.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/offchain/src/lib.rs b/client/offchain/src/lib.rs index e0da76d31f52c..af957bec5b3b7 100644 --- a/client/offchain/src/lib.rs +++ b/client/offchain/src/lib.rs @@ -217,6 +217,6 @@ mod tests { // then assert_eq!(pool.0.status().ready, 1); - assert_eq!(pool.0.ready().next().unwrap().is_propagatable(), false); + assert_eq!(pool.0.ready().next().unwrap().is_propagable(), false); } } diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 0745b4d32a09d..76ef0554f2674 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -625,7 +625,7 @@ where E: IntoPoolError + From, { pool.ready() - .filter(|t| t.is_propagatable()) + .filter(|t| t.is_propagable()) .map(|t| { let hash = t.hash().clone(); let ex: B::Extrinsic = t.data().clone(); diff --git a/client/transaction-pool/graph/src/base_pool.rs b/client/transaction-pool/graph/src/base_pool.rs index d10ecf450afa9..b0cf934a1cd8c 100644 --- a/client/transaction-pool/graph/src/base_pool.rs +++ b/client/transaction-pool/graph/src/base_pool.rs @@ -138,7 +138,7 @@ impl InPoolTransaction for Transaction { &self.provides } - fn is_propagatable(&self) -> bool { + fn is_propagable(&self) -> bool { self.propagate } } @@ -1058,7 +1058,7 @@ requires: [03,02], provides: [04], data: [4]}".to_owned() requires: vec![vec![3], vec![2]], provides: vec![vec![4]], propagate: true, - }.is_propagatable(), true); + }.is_propagable(), true); assert_eq!(Transaction { data: vec![4u8], @@ -1069,7 +1069,7 @@ requires: [03,02], provides: [04], data: [4]}".to_owned() requires: vec![vec![3], vec![2]], provides: vec![vec![4]], propagate: false, - }.is_propagatable(), false); + }.is_propagable(), false); } #[test] diff --git a/primitives/transaction-pool/src/pool.rs b/primitives/transaction-pool/src/pool.rs index c2623324bcf70..89f327a523b5e 100644 --- a/primitives/transaction-pool/src/pool.rs +++ b/primitives/transaction-pool/src/pool.rs @@ -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_propagatable(&self) -> bool; + fn is_propagable(&self) -> bool; } /// Transaction pool interface. From a3292c82c48a3afa4f47414159a473b1c328ff75 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:14:30 +0100 Subject: [PATCH 114/201] ecountered -> encountered --- primitives/runtime/src/offchain/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/runtime/src/offchain/http.rs b/primitives/runtime/src/offchain/http.rs index 50c4a5eae6c1c..88f4323ad7e9e 100644 --- a/primitives/runtime/src/offchain/http.rs +++ b/primitives/runtime/src/offchain/http.rs @@ -257,7 +257,7 @@ pub enum Error { DeadlineReached, /// Request had timed out. IoError, - /// Unknown error has been ecountered. + /// Unknown error has been encountered. Unknown, } From 86bb08b31c82792b2e6d4b04bb10564c59fad3ad Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:21:56 +0100 Subject: [PATCH 115/201] recognise -> recognize --- bin/utils/subkey/src/main.rs | 4 ++-- docs/SECURITY.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/utils/subkey/src/main.rs b/bin/utils/subkey/src/main.rs index 4d7e220642270..33209692caffb 100644 --- a/bin/utils/subkey/src/main.rs +++ b/bin/utils/subkey/src/main.rs @@ -280,7 +280,7 @@ fn get_app<'a, 'b>(usage: &'a str) -> App<'a, 'b> { SubCommand::with_name("transfer") .about("Author and sign a Node pallet_balances::Transfer transaction with a given (secret) key") .args_from_usage(" - -g, --genesis 'The genesis hash or a recognised \ + -g, --genesis 'The genesis hash or a recognized \ chain identifier (dev, elm, alex).' 'The signing secret key URI.' 'The destination account public key URI.' @@ -572,7 +572,7 @@ fn read_genesis_hash(matches: &ArgMatches) -> Result { "elm" => hex!["10c08714a10c7da78f40a60f6f732cf0dba97acfb5e2035445b032386157d5c3"].into(), "alex" => hex!["dcd1346701ca8396496e52aa2785b1748deb6db09551b72159dcb3e08991025b"].into(), h => Decode::decode(&mut &decode_hex(h)?[..]) - .expect("Invalid genesis hash or unrecognised chain identifier"), + .expect("Invalid genesis hash or unrecognized chain identifier"), }; println!( "Using a genesis hash of {}", diff --git a/docs/SECURITY.md b/docs/SECURITY.md index b850e5462e2a8..7240218fa8729 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -36,7 +36,7 @@ Responsible investigation and reporting includes, but isn't limited to, the foll ## Bug Bounty Program -Our Bug Bounty Program allows us to recognise and reward members of the Parity community for helping us find and address significant bugs, in accordance with the terms of the Parity Bug Bounty Program. A detailed description on eligibility, rewards, legal information and terms & conditions for contributors can be found on [our website](https://paritytech.io/bug-bounty.html). +Our Bug Bounty Program allows us to recognize and reward members of the Parity community for helping us find and address significant bugs, in accordance with the terms of the Parity Bug Bounty Program. A detailed description on eligibility, rewards, legal information and terms & conditions for contributors can be found on [our website](https://paritytech.io/bug-bounty.html). From d32388c61d5b8f2d789995754587e4707d648370 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:22:28 +0100 Subject: [PATCH 116/201] intergration -> integration --- docs/Structure.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Structure.adoc b/docs/Structure.adoc index cb0e4b28cb001..c8cd63506a347 100644 --- a/docs/Structure.adoc +++ b/docs/Structure.adoc @@ -67,7 +67,7 @@ There are a few crates with the `frame-` prefix. These do not contain domain-spe ** only helpers may be published ** purely testing crates must be `publish = false` -All tests that have to pull (dev)-dependencies out of their subtree and would thus break the dependency rules are considered intergration tests and should be stored in here. Only helper-crates in here shall be published, everything else is expected to be non-publish. +All tests that have to pull (dev)-dependencies out of their subtree and would thus break the dependency rules are considered integration tests and should be stored in here. Only helper-crates in here shall be published, everything else is expected to be non-publish. === Binaries and template From e7d8bd5936fccd250bf8b0a3b0697bc3b9b40d35 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:23:05 +0100 Subject: [PATCH 117/201] lastet -> latest --- docs/CONTRIBUTING.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.adoc b/docs/CONTRIBUTING.adoc index 817e1d7489f39..c83b686b097e6 100644 --- a/docs/CONTRIBUTING.adoc +++ b/docs/CONTRIBUTING.adoc @@ -52,7 +52,7 @@ If your PR changes the external APIs or interfaces used by Polkadot, **a corresp To update a corresponding Polkadot PR: -0. Pull lastet Polkadot master (or clone it, if you haven't yet). +0. Pull latest Polkadot master (or clone it, if you haven't yet). 1. Replace `polkadot-master` in all `Cargo.toml` with the name of the PR-branch - e.g. by running `find . -name "Cargo.toml" -exec sed -i "s/polkadot-master/PR_BRANCH/g" {}` (and to your repo, if the branch is not on mainline); Commit this change. 2. Make the changes required to pass the build again. 3. Submit all this as a PR against the Polkadot Repo, link that new PR in the existing substrate PR for reference From 85d6caddecc663382e2481c32d528ca5d1449277 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:24:28 +0100 Subject: [PATCH 118/201] datatypes -> data types --- docs/README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.adoc b/docs/README.adoc index d8c582296cabb..bbc2713fbeb79 100644 --- a/docs/README.adoc +++ b/docs/README.adoc @@ -24,13 +24,13 @@ Substrate is designed for use in one of three ways: **1. Trivial**: By running the Substrate binary `substrate` and configuring it with a genesis block that includes the current demonstration runtime. In this case, you just build Substrate, configure a JSON file, and launch your own blockchain. This affords you the least amount of customizability, primarily allowing you to change the genesis parameters of the various included runtime modules such as balances, staking, block-period, fees, and governance. -**2. Modular**: By hacking together pallets built with Substrate FRAME into a new runtime and possibly altering or reconfiguring the Substrate client's block authoring logic. This affords you a very large amount of freedom over your blockchain's logic, letting you change datatypes, add or remove modules, and crucially, add your own modules. Much can be changed without touching the block authoring logic (since it is generic). If this is the case, then the existing Substrate binary can be used for block authoring and syncing. If the block authoring logic needs to be tweaked, then a new, altered block authoring binary must be built as a separate project and used by validators. This is how the Polkadot relay chain is built and should suffice for almost all circumstances in the near to mid-term. +**2. Modular**: By hacking together pallets built with Substrate FRAME into a new runtime and possibly altering or reconfiguring the Substrate client's block authoring logic. This affords you a very large amount of freedom over your blockchain's logic, letting you change data types, add or remove modules, and crucially, add your own modules. Much can be changed without touching the block authoring logic (since it is generic). If this is the case, then the existing Substrate binary can be used for block authoring and syncing. If the block authoring logic needs to be tweaked, then a new, altered block authoring binary must be built as a separate project and used by validators. This is how the Polkadot relay chain is built and should suffice for almost all circumstances in the near to mid-term. **3. Generic**: The entire SRML can be ignored and the entire runtime designed and implemented from scratch. If desired, this can be done in a language other than Rust, provided it can target WebAssembly. If the runtime can be made compatible with the existing client's block authoring logic, then you can simply construct a new genesis block from your Wasm blob and launch your chain with the existing Rust-based Substrate client. If not, then you'll need to alter the client's block authoring logic accordingly. This is probably a useless option for most projects right now, but provides complete flexibility allowing for a long-term, far-reaching upgrade path for the Substrate paradigm. === The Basics of Substrate -Substrate is a blockchain platform with a completely generic state transition function. That said, it does come with both standards and conventions (particularly regarding the Runtime Module Library) regarding underlying data structures. Roughly speaking, these core datatypes correspond to +trait+s in terms of the actual non-negotiable standard and generic +struct+s in terms of the convention. +Substrate is a blockchain platform with a completely generic state transition function. That said, it does come with both standards and conventions (particularly regarding the Runtime Module Library) regarding underlying data structures. Roughly speaking, these core data types correspond to +trait+s in terms of the actual non-negotiable standard and generic +struct+s in terms of the convention. ``` Header := Parent + ExtrinsicsRoot + StorageRoot + Digest From 5856c53d23901579c21fd5f8d348a12a9ee106a3 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:25:07 +0100 Subject: [PATCH 119/201] datatype -> data type --- client/consensus/epochs/src/lib.rs | 2 +- frame/balances/src/lib.rs | 2 +- primitives/runtime/src/generic/digest.rs | 2 +- primitives/runtime/src/traits.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/consensus/epochs/src/lib.rs b/client/consensus/epochs/src/lib.rs index cf3d9f5c4c2c2..05ee611de1378 100644 --- a/client/consensus/epochs/src/lib.rs +++ b/client/consensus/epochs/src/lib.rs @@ -141,7 +141,7 @@ impl ViableEpoch where } } -/// The datatype encoded on disk. +/// The data type encoded on disk. #[derive(Clone, Encode, Decode)] pub enum PersistedEpoch { /// Genesis persisted epoch data. epoch_0, epoch_1. diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index fc2294dd5113f..2c8ae3e18fe8e 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -1224,7 +1224,7 @@ impl, I: Instance> ReservableCurrency for Module let actual = cmp::min(account.reserved, value); account.reserved -= actual; // defensive only: this can never fail since total issuance which is at least free+reserved - // fits into the same datatype. + // fits into the same data type. account.free = account.free.saturating_add(actual); value - actual }) diff --git a/primitives/runtime/src/generic/digest.rs b/primitives/runtime/src/generic/digest.rs index 9d4fbe48d55a5..dad3e1fc26b7c 100644 --- a/primitives/runtime/src/generic/digest.rs +++ b/primitives/runtime/src/generic/digest.rs @@ -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(&self, id: OpaqueDigestItemId) -> Option { self.try_as_raw(id).and_then(|mut x| Decode::decode(&mut x).ok()) } diff --git a/primitives/runtime/src/traits.rs b/primitives/runtime/src/traits.rs index 4cb9cb32123e4..1b9b9eec70c10 100644 --- a/primitives/runtime/src/traits.rs +++ b/primitives/runtime/src/traits.rs @@ -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. From d1fc4ed0e325bcfb1175cee247a29381d358c5c0 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:26:00 +0100 Subject: [PATCH 120/201] Strongarming -> Strong Arming --- docs/CODE_OF_CONDUCT.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CODE_OF_CONDUCT.adoc b/docs/CODE_OF_CONDUCT.adoc index 7cb0210e8efac..0f7de7c7efee1 100644 --- a/docs/CODE_OF_CONDUCT.adoc +++ b/docs/CODE_OF_CONDUCT.adoc @@ -22,7 +22,7 @@ Examples of unacceptable behavior by participants include: * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting -=== Facilitation, Not Strongarming +=== Facilitation, Not Strong Arming We recognize that this software is merely a tool for users to create and maintain their blockchain of preference. We see that blockchains are naturally community platforms with users being the ultimate decision makers. We assert that good software will maximize user agency by facilitate user-expression on the network. As such: From 0fe25fd2ce76ab981fa023fbeb4bc00fe5cae557 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:29:44 +0100 Subject: [PATCH 121/201] avaible -> available --- client/chain-spec/derive/src/impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/chain-spec/derive/src/impls.rs b/client/chain-spec/derive/src/impls.rs index 2caf1c5a9c3eb..43874241f600f 100644 --- a/client/chain-spec/derive/src/impls.rs +++ b/client/chain-spec/derive/src/impls.rs @@ -108,7 +108,7 @@ pub fn derive( let err = || { let err = Error::new( Span::call_site(), - "ChainSpecGroup is only avaible for structs with named fields." + "ChainSpecGroup is only available for structs with named fields." ).to_compile_error(); quote!( #err ).into() }; From 5dd8f4de1733d4183f2eaa3b49a025d7d58ccd63 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:31:02 +0100 Subject: [PATCH 122/201] Commiting -> Committing --- client/db/src/children.rs | 4 ++-- client/db/src/storage_cache.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/db/src/children.rs b/client/db/src/children.rs index c90af66027fdc..2ef67de6a83e1 100644 --- a/client/db/src/children.rs +++ b/client/db/src/children.rs @@ -100,7 +100,7 @@ mod tests { children2.push(1_6); write_children(&mut tx, 0, PREFIX, 1_2, children2); - db.write(tx.clone()).expect("(2) Commiting transaction failed"); + db.write(tx.clone()).expect("(2) Committing transaction failed"); let r1: Vec = read_children(&db, 0, PREFIX, 1_1).expect("(1) Getting r1 failed"); let r2: Vec = read_children(&db, 0, PREFIX, 1_2).expect("(1) Getting r2 failed"); @@ -109,7 +109,7 @@ mod tests { assert_eq!(r2, vec![1_4, 1_6]); remove_children(&mut tx, 0, PREFIX, 1_2); - db.write(tx).expect("(2) Commiting transaction failed"); + db.write(tx).expect("(2) Committing transaction failed"); let r1: Vec = read_children(&db, 0, PREFIX, 1_1).expect("(2) Getting r1 failed"); let r2: Vec = read_children(&db, 0, PREFIX, 1_2).expect("(2) Getting r2 failed"); diff --git a/client/db/src/storage_cache.rs b/client/db/src/storage_cache.rs index fd85a899b628e..2c3f8f9fd6ea5 100644 --- a/client/db/src/storage_cache.rs +++ b/client/db/src/storage_cache.rs @@ -338,7 +338,7 @@ impl CacheChanges { is_best, ); let cache = &mut *cache; - // Filter out commiting block if any. + // Filter out committing block if any. let enacted: Vec<_> = enacted .iter() .filter(|h| commit_hash.as_ref().map_or(true, |p| *h != p)) From 5f23749473d7cbf259f5c07f0437d51a9894e73d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:32:44 +0100 Subject: [PATCH 123/201] Retreiving -> Retrieving --- client/consensus/babe/src/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/consensus/babe/src/tests.rs b/client/consensus/babe/src/tests.rs index 687f23e646f66..c0eccdcc02bf5 100644 --- a/client/consensus/babe/src/tests.rs +++ b/client/consensus/babe/src/tests.rs @@ -316,12 +316,12 @@ impl TestNetFactory for BabeTestNet { } fn peer(&mut self, i: usize) -> &mut Peer { - trace!(target: "babe", "Retreiving a peer"); + trace!(target: "babe", "Retrieving a peer"); &mut self.peers[i] } fn peers(&self) -> &Vec> { - trace!(target: "babe", "Retreiving peers"); + trace!(target: "babe", "Retrieving peers"); &self.peers } From 2240572b3f9ebd2409c22927f76e9190965cadd9 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:34:36 +0100 Subject: [PATCH 124/201] shoud -> should --- client/db/src/storage_cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/storage_cache.rs b/client/db/src/storage_cache.rs index 2c3f8f9fd6ea5..6ef29f47b8c42 100644 --- a/client/db/src/storage_cache.rs +++ b/client/db/src/storage_cache.rs @@ -1453,7 +1453,7 @@ mod qc { self.head_state( self.canon.last() - .expect("wasn't forking to emptiness so there shoud be one!") + .expect("wasn't forking to emptiness so there should be one!") .hash ) }, From 506ff471464d2e6e440613440f417f8fecb6bf1d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:35:27 +0100 Subject: [PATCH 125/201] canonicaliziation -> canonicalization --- client/db/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index b64123428160a..42257f15e2312 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -1000,7 +1000,7 @@ impl Backend { Ok((*hash, number, false, true)) } - // performs forced canonicaliziation with a delay after importing a non-finalized block. + // performs forced canonicalization with a delay after importing a non-finalized block. fn force_delayed_canonicalize( &self, transaction: &mut DBTransaction, From e1bfcc6f2f828337e22dbfe14b8d4746bcd4660a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:36:09 +0100 Subject: [PATCH 126/201] comitted -> committed --- client/db/src/changes_tries_storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/changes_tries_storage.rs b/client/db/src/changes_tries_storage.rs index 72163a5694213..99488bbaed096 100644 --- a/client/db/src/changes_tries_storage.rs +++ b/client/db/src/changes_tries_storage.rs @@ -48,7 +48,7 @@ pub fn extract_new_configuration(header: &Header) -> Option<&Op /// Opaque configuration cache transaction. During its lifetime, no-one should modify cache. This is currently /// guaranteed because import lock is held during block import/finalization. pub struct DbChangesTrieStorageTransaction { - /// Cache operations that must be performed after db transaction is comitted. + /// Cache operations that must be performed after db transaction is committed. cache_ops: DbCacheTransactionOps, /// New configuration (if changed at current block). new_config: Option>, From 961e698b089aec6ca2412f5e8b1c0e94fe94c494 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:37:06 +0100 Subject: [PATCH 127/201] clonable -> cloneable --- client/finality-grandpa/src/communication/mod.rs | 4 ++-- client/telemetry/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index 540923c1b1b89..dd69c082c5414 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -153,14 +153,14 @@ pub(crate) struct NetworkBridge> { /// `NeighborPacketWorker` processing packets sent through the `NeighborPacketSender`. // - // `NetworkBridge` is required to be clonable, thus one needs to be able to clone its children, + // `NetworkBridge` is required to be cloneable, thus one needs to be able to clone its children, // thus one has to wrap neighor_packet_worker with an `Arc` `Mutex`. neighbor_packet_worker: Arc>>, /// Receiver side of the peer report stream populated by the gossip validator, forwarded to the /// gossip engine. // - // `NetworkBridge` is required to be clonable, thus one needs to be able to clone its children, + // `NetworkBridge` is required to be cloneable, thus one needs to be able to clone its children, // thus one has to wrap gossip_validator_report_stream with an `Arc` `Mutex`. Given that it is // just an `UnboundedReceiver`, one could also switch to a multi-producer-*multi*-consumer // channel implementation. diff --git a/client/telemetry/src/lib.rs b/client/telemetry/src/lib.rs index 1c6f1425d6647..f8ca6d5c73d41 100644 --- a/client/telemetry/src/lib.rs +++ b/client/telemetry/src/lib.rs @@ -126,7 +126,7 @@ pub struct Telemetry { /// Behind the `Mutex` in `Telemetry`. /// -/// Note that ideally we wouldn't have to make the `Telemetry` clonable, as that would remove the +/// Note that ideally we wouldn't have to make the `Telemetry` cloneable, as that would remove the /// need for a `Mutex`. However there is currently a weird hack in place in `sc-service` /// where we extract the telemetry registration so that it continues running during the shutdown /// process. @@ -195,7 +195,7 @@ impl Stream for Telemetry { fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll> { let before = Instant::now(); - // Because the `Telemetry` is clonable, we need to put the actual fields behind a `Mutex`. + // Because the `Telemetry` is cloneable, we need to put the actual fields behind a `Mutex`. // However, the user is only ever supposed to poll from one instance of `Telemetry`, while // the other instances are used only for RAII purposes. // We assume that the user is following this advice and therefore that the `Mutex` is only From 1e0a5d081f24bfb828f59f6c37531b7204b9125b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:37:32 +0100 Subject: [PATCH 128/201] Uknown -> Unknown --- client/finality-grandpa/src/communication/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index dd69c082c5414..d6541a4e1bde0 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -74,7 +74,7 @@ mod cost { pub(super) const MALFORMED_CATCH_UP: Rep = Rep::new(-1000, "Grandpa: Malformed cath-up"); pub(super) const MALFORMED_COMMIT: Rep = Rep::new(-1000, "Grandpa: Malformed commit"); pub(super) const FUTURE_MESSAGE: Rep = Rep::new(-500, "Grandpa: Future message"); - pub(super) const UNKNOWN_VOTER: Rep = Rep::new(-150, "Grandpa: Uknown voter"); + pub(super) const UNKNOWN_VOTER: Rep = Rep::new(-150, "Grandpa: Unknown voter"); pub(super) const INVALID_VIEW_CHANGE: Rep = Rep::new(-500, "Grandpa: Invalid view change"); pub(super) const PER_UNDECODABLE_BYTE: i32 = -5; From 9846852e538302425d2369528f9e7c50a8e77858 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:38:18 +0100 Subject: [PATCH 129/201] reponse -> response --- client/network/src/protocol/message.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/network/src/protocol/message.rs b/client/network/src/protocol/message.rs index ef7d550de6cbe..a2261b2059110 100644 --- a/client/network/src/protocol/message.rs +++ b/client/network/src/protocol/message.rs @@ -209,13 +209,13 @@ pub mod generic { RemoteHeaderResponse(RemoteHeaderResponse
), /// Remote changes request. RemoteChangesRequest(RemoteChangesRequest), - /// Remote changes reponse. + /// Remote changes response. RemoteChangesResponse(RemoteChangesResponse), /// Remote child storage read request. RemoteReadChildRequest(RemoteReadChildRequest), /// Finality proof request. FinalityProofRequest(FinalityProofRequest), - /// Finality proof reponse. + /// Finality proof response. FinalityProofResponse(FinalityProofResponse), /// Batch of consensus protocol messages. ConsensusBatch(Vec), From da8c7ea1858b2cd122e272fae21edc96a0293d21 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:39:17 +0100 Subject: [PATCH 130/201] arbitary -> arbitrary --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 2ffa8bd61b1f7..3472c31a9b7f7 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -718,7 +718,7 @@ pub struct BuildSpecCmd { pub node_key_params: NodeKeyParams, } -/// Wrapper type of `String` which holds an arbitary sized unsigned integer formatted as decimal. +/// Wrapper type of `String` which holds an arbitrary sized unsigned integer formatted as decimal. #[derive(Debug, Clone)] pub struct BlockNumber(String); From a8727d119c04262bfb389ad6d2693456933bf6e5 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:40:49 +0100 Subject: [PATCH 131/201] Capapbilities -> Capabilities --- client/api/src/execution_extensions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index 1a986a23a47dc..ebfe3da8f42c2 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -64,7 +64,7 @@ impl Default for ExecutionStrategies { /// Generate the starting set of ExternalitiesExtensions based upon the given capabilities pub trait ExtensionsFactory: Send + Sync { - /// Make `Extensions` for given Capapbilities + /// Make `Extensions` for given Capabilities fn extensions_for(&self, capabilities: offchain::Capabilities) -> Extensions; } From 2dc2ae56b027bc2fcd0d061f024489756006e1f9 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:41:14 +0100 Subject: [PATCH 132/201] responsbile -> responsible --- client/api/src/execution_extensions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index ebfe3da8f42c2..a36499bf48d5c 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -77,7 +77,7 @@ impl ExtensionsFactory for () { /// A producer of execution extensions for offchain calls. /// /// This crate aggregates extensions available for the offchain calls -/// and is responsbile to produce a right `Extensions` object +/// and is responsible to produce a right `Extensions` object /// for each call, based on required `Capabilities`. pub struct ExecutionExtensions { strategies: ExecutionStrategies, From 706a3d335970a72355e47d1544d70de31af0e1ff Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:41:55 +0100 Subject: [PATCH 133/201] initialisation -> initialization --- client/api/src/execution_extensions.rs | 2 +- test-utils/client/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index a36499bf48d5c..bade5db265929 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -125,7 +125,7 @@ impl ExecutionExtensions { /// To break retain cycle between `Client` and `TransactionPool` we require this /// extension to be a `Weak` reference. /// That's also the reason why it's being registered lazily instead of - /// during initialisation. + /// during initialization. pub fn register_transaction_pool(&self, pool: Weak>) { *self.transaction_pool.write() = Some(pool); } diff --git a/test-utils/client/src/lib.rs b/test-utils/client/src/lib.rs index e95c5ad162760..afe11903d5be9 100644 --- a/test-utils/client/src/lib.rs +++ b/test-utils/client/src/lib.rs @@ -50,7 +50,7 @@ pub type LightBackend = sc_client::light::backend::Backend< Blake2Hasher, >; -/// A genesis storage initialisation trait. +/// A genesis storage initialization trait. pub trait GenesisInit: Default { /// Construct genesis storage. fn genesis_storage(&self) -> Storage; From 5ea172f4ec2418a02d71ff953081b35ae5663c0a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:46:26 +0100 Subject: [PATCH 134/201] cames -> came --- client/finality-grandpa/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index cf340c695451c..e3d58f81aaec3 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -147,7 +147,7 @@ impl TestNetFactory for GrandpaTestNet { use crate::light_import::tests::light_block_import_without_justifications; let authorities_provider = Arc::new(self.test_config.clone()); - // forbid direct finalization using justification that cames with the block + // forbid direct finalization using justification that came with the block // => light clients will try to fetch finality proofs let import = light_block_import_without_justifications( client.clone(), From d5400568530ad1465272e45433696213fad95f25 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:46:57 +0100 Subject: [PATCH 135/201] intemediate -> intermediate --- client/finality-grandpa/src/finality_proof.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/finality-grandpa/src/finality_proof.rs b/client/finality-grandpa/src/finality_proof.rs index fb0f7fd4a9bab..aaa9a1f746660 100644 --- a/client/finality-grandpa/src/finality_proof.rs +++ b/client/finality-grandpa/src/finality_proof.rs @@ -920,7 +920,7 @@ pub(crate) mod tests { } #[test] - fn finality_proof_check_fails_when_intemediate_fragment_has_unknown_headers() { + fn finality_proof_check_fails_when_intermediate_fragment_has_unknown_headers() { let blockchain = test_blockchain(); // when intermediate (#0) fragment has non-empty unknown headers @@ -945,7 +945,7 @@ pub(crate) mod tests { } #[test] - fn finality_proof_check_fails_when_intemediate_fragment_has_no_authorities_proof() { + fn finality_proof_check_fails_when_intermediate_fragment_has_no_authorities_proof() { let blockchain = test_blockchain(); // when intermediate (#0) fragment has empty authorities proof From 0f7762d5e8c7c55ba12dab2c843d5952ba87034b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:47:16 +0100 Subject: [PATCH 136/201] reqeust -> request --- client/finality-grandpa/src/communication/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index d6541a4e1bde0..15194fa1a599d 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -83,7 +83,7 @@ mod cost { pub(super) const INVALID_CATCH_UP: Rep = Rep::new(-5000, "Grandpa: Invalid catch-up"); pub(super) const INVALID_COMMIT: Rep = Rep::new(-5000, "Grandpa: Invalid commit"); pub(super) const OUT_OF_SCOPE_MESSAGE: Rep = Rep::new(-500, "Grandpa: Out-of-scope message"); - pub(super) const CATCH_UP_REQUEST_TIMEOUT: Rep = Rep::new(-200, "Grandpa: Catch-up reqeust timeout"); + pub(super) const CATCH_UP_REQUEST_TIMEOUT: Rep = Rep::new(-200, "Grandpa: Catch-up request timeout"); // cost of answering a catch up request pub(super) const CATCH_UP_REPLY: Rep = Rep::new(-200, "Grandpa: Catch-up reply"); From fa7ab6e0364b85dcb31c1d9d77fcd39e00589044 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:47:58 +0100 Subject: [PATCH 137/201] intance -> instance --- client/executor/wasmtime/src/instance_wrapper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/executor/wasmtime/src/instance_wrapper.rs b/client/executor/wasmtime/src/instance_wrapper.rs index 013651cd7af88..e509c6d6ecd26 100644 --- a/client/executor/wasmtime/src/instance_wrapper.rs +++ b/client/executor/wasmtime/src/instance_wrapper.rs @@ -32,7 +32,7 @@ use wasmtime::{Instance, Module, Memory, Table, Val}; /// routines. pub struct InstanceWrapper { instance: Instance, - // The memory instance of the `intance`. + // The memory instance of the `instance`. // // It is important to make sure that we don't make any copies of this to make it easier to proof // See `memory_as_slice` and `memory_as_slice_mut`. From c780d0482153f07cd3ecc991c7990bf22d6535cb Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:51:55 +0100 Subject: [PATCH 138/201] explcitly -> explicitly --- client/transaction-pool/graph/src/base_pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/transaction-pool/graph/src/base_pool.rs b/client/transaction-pool/graph/src/base_pool.rs index b0cf934a1cd8c..33b7a51f9415b 100644 --- a/client/transaction-pool/graph/src/base_pool.rs +++ b/client/transaction-pool/graph/src/base_pool.rs @@ -1126,7 +1126,7 @@ requires: [03,02], provides: [04], data: [4]}".to_owned() } #[test] - fn should_accept_future_transactions_when_explcitly_asked_to() { + fn should_accept_future_transactions_when_explicitly_asked_to() { // given let mut pool = pool(); pool.reject_future_transactions = true; From 48ab6d8cfa3eea3f849d23369f5d56fbcc130765 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:55:18 +0100 Subject: [PATCH 139/201] neighor -> neighbor --- client/finality-grandpa/src/communication/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index 15194fa1a599d..7159910c19e66 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -154,7 +154,7 @@ pub(crate) struct NetworkBridge> { /// `NeighborPacketWorker` processing packets sent through the `NeighborPacketSender`. // // `NetworkBridge` is required to be cloneable, thus one needs to be able to clone its children, - // thus one has to wrap neighor_packet_worker with an `Arc` `Mutex`. + // thus one has to wrap neighbor_packet_worker with an `Arc` `Mutex`. neighbor_packet_worker: Arc>>, /// Receiver side of the peer report stream populated by the gossip validator, forwarded to the From 8701bfd9c86873808efe5b46e1b3b2eebbc1c6c8 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:55:49 +0100 Subject: [PATCH 140/201] reolving -> resolving --- client/executor/wasmi/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/executor/wasmi/src/lib.rs b/client/executor/wasmi/src/lib.rs index b90c0f05f5d9e..a0e11dfcf8b93 100644 --- a/client/executor/wasmi/src/lib.rs +++ b/client/executor/wasmi/src/lib.rs @@ -276,7 +276,7 @@ struct Resolver<'a> { /// Will be used as initial and maximum size of the imported memory. heap_pages: usize, /// By default, runtimes should import memory and this is `Some(_)` after - /// reolving. However, to be backwards compatible, we also support memory + /// resolving. However, to be backwards compatible, we also support memory /// exported by the WASM blob (this will be `None` after resolving). import_memory: RefCell>, } From 5727580941e69cfc5855990195402833b1f0a5c4 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:56:09 +0100 Subject: [PATCH 141/201] untill -> until --- client/executor/common/src/sandbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/executor/common/src/sandbox.rs b/client/executor/common/src/sandbox.rs index f920a47ca7655..d002d83d3ca37 100644 --- a/client/executor/common/src/sandbox.rs +++ b/client/executor/common/src/sandbox.rs @@ -498,7 +498,7 @@ pub fn instantiate<'a, FE: SandboxCapabilities>( /// /// This is generic over a supervisor function reference type. pub struct Store { - // Memories and instances are `Some` untill torndown. + // Memories and instances are `Some` until torndown. instances: Vec>>>, memories: Vec>, } From 232ead488b6bcb76c0b4951451d50fa29c628c68 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:57:24 +0100 Subject: [PATCH 142/201] Validte -> Validate --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 3472c31a9b7f7..40ca0ac87b0b6 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -908,7 +908,7 @@ pub enum Subcommand { /// Import blocks from file. ImportBlocks(ImportBlocksCmd), - /// Validte a single block. + /// Validate a single block. CheckBlock(CheckBlockCmd), /// Revert chain to the previous state. From 53a5270eb826734c9e922923ea617d5438c2d5b4 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:58:37 +0100 Subject: [PATCH 143/201] deserailize -> deserialize --- client/chain-spec/src/chain_spec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/chain-spec/src/chain_spec.rs b/client/chain-spec/src/chain_spec.rs index 81cbce5ea731c..696fef56645a5 100644 --- a/client/chain-spec/src/chain_spec.rs +++ b/client/chain-spec/src/chain_spec.rs @@ -336,7 +336,7 @@ mod tests { type TestSpec = ChainSpec; #[test] - fn should_deserailize_example_chain_spec() { + fn should_deserialize_example_chain_spec() { let spec1 = TestSpec::from_json_bytes(Cow::Owned( include_bytes!("../res/chain_spec.json").to_vec() )).unwrap(); From ae4a295250d2fdfebaea5e79cce7d39f2b5f0c0a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 17:59:34 +0100 Subject: [PATCH 144/201] literaly -> literally --- client/network/src/service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 156e2e3102b01..750ca97b6d666 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -368,7 +368,7 @@ impl, H: ExHashT> NetworkWorker /// Get network state. /// - /// **Note**: Use this only for debugging. This API is unstable. There are warnings literaly + /// **Note**: Use this only for debugging. This API is unstable. There are warnings literally /// everywhere about this. Please don't use this function to retrieve actual information. pub fn network_state(&mut self) -> NetworkState { let swarm = &mut self.network_service; From b4fd7b598214963853ac824252d712982d088727 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:02:24 +0100 Subject: [PATCH 145/201] preceeding -> preceding --- client/db/src/cache/list_entry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/cache/list_entry.rs b/client/db/src/cache/list_entry.rs index d3f7dd57693c1..e18434329079b 100644 --- a/client/db/src/cache/list_entry.rs +++ b/client/db/src/cache/list_entry.rs @@ -69,7 +69,7 @@ impl Entry { .map(|(entry, next)| (entry.valid_from, next))) } - /// Searches the list, ending with THIS entry for the best entry preceeding (or at) + /// Searches the list, ending with THIS entry for the best entry preceding (or at) /// given block number. /// If the entry is found, result is the entry and the block id of next entry (if exists). /// NOTE that this function does not check that the passed block is actually linked to From 9a7f6de3eaca434a332b4570f4ef304c19810571 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:02:52 +0100 Subject: [PATCH 146/201] abpve -> above --- client/db/src/cache/list_cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/cache/list_cache.rs b/client/db/src/cache/list_cache.rs index 72278a1e85e6d..57bbecd5809e1 100644 --- a/client/db/src/cache/list_cache.rs +++ b/client/db/src/cache/list_cache.rs @@ -357,7 +357,7 @@ impl> ListCache // it is possible that we're inserting extra (but still required) fork here let new_storage_entry = StorageEntry { prev_valid_from: Some(prev_valid_from), - value: value.expect("chcecked abpve that !value.is_none(); qed"), + value: value.expect("chcecked above that !value.is_none(); qed"), }; tx.insert_storage_entry(&block, &new_storage_entry); From 4775fcc620df678f503f3801d9e4114282b1a77d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:04:00 +0100 Subject: [PATCH 147/201] chcecked -> checked --- client/db/src/cache/list_cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/cache/list_cache.rs b/client/db/src/cache/list_cache.rs index 57bbecd5809e1..f3a8171342c91 100644 --- a/client/db/src/cache/list_cache.rs +++ b/client/db/src/cache/list_cache.rs @@ -357,7 +357,7 @@ impl> ListCache // it is possible that we're inserting extra (but still required) fork here let new_storage_entry = StorageEntry { prev_valid_from: Some(prev_valid_from), - value: value.expect("chcecked above that !value.is_none(); qed"), + value: value.expect("checked above that !value.is_none(); qed"), }; tx.insert_storage_entry(&block, &new_storage_entry); From 6ea66192ae9a09996fcaf093b74a24fe84203523 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:04:46 +0100 Subject: [PATCH 148/201] numbet -> number --- client/db/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index 42257f15e2312..e857715463b7d 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -878,7 +878,7 @@ impl Backend { inmem } - /// Returns total numbet of blocks (headers) in the block DB. + /// Returns total number of blocks (headers) in the block DB. #[cfg(feature = "test-helpers")] pub fn blocks_count(&self) -> u64 { self.blockchain.db.iter(columns::HEADER).count() as u64 From d58c904ce0ece0c43c7951e158405f7589574992 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:05:17 +0100 Subject: [PATCH 149/201] Unknow -> Unknown --- client/executor/wasmtime/src/instance_wrapper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/executor/wasmtime/src/instance_wrapper.rs b/client/executor/wasmtime/src/instance_wrapper.rs index e509c6d6ecd26..159746801a52a 100644 --- a/client/executor/wasmtime/src/instance_wrapper.rs +++ b/client/executor/wasmtime/src/instance_wrapper.rs @@ -142,7 +142,7 @@ impl InstanceWrapper { Val::I64(val) => Ok(Some(Value::I64(val))), Val::F32(val) => Ok(Some(Value::F32(val))), Val::F64(val) => Ok(Some(Value::F64(val))), - _ => Err("Unknow value type".into()), + _ => Err("Unknown value type".into()), } } } From ce2c5f40d06b6aeb18d6d32ed55b70daef9f5fa7 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:05:46 +0100 Subject: [PATCH 150/201] halfs -> halves --- client/finality-grandpa/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index e3d58f81aaec3..a3a2f6ae79d17 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -982,7 +982,7 @@ fn force_change_to_new_set() { // it will only finalize if the forced transition happens. // we add_blocks after the voters are spawned because otherwise - // the link-halfs have the wrong AuthoritySet + // the link-halveshave the wrong AuthoritySet run_to_completion(&mut runtime, 25, net, peers_a); } From 374ad37eba4d838137e16f1de28f55d0c93b4b8d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:06:32 +0100 Subject: [PATCH 151/201] gossup -> gossip --- client/network-gossip/src/state_machine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network-gossip/src/state_machine.rs b/client/network-gossip/src/state_machine.rs index 2acfdc3785189..26433e63ec3ea 100644 --- a/client/network-gossip/src/state_machine.rs +++ b/client/network-gossip/src/state_machine.rs @@ -45,7 +45,7 @@ mod rep { pub const DUPLICATE_GOSSIP: Rep = Rep::new(-(1 << 2), "Duplicate gossip"); /// Reputation change when a peer sends us a gossip message for an unknown engine, whatever that /// means. - pub const UNKNOWN_GOSSIP: Rep = Rep::new(-(1 << 6), "Unknown gossup message engine id"); + pub const UNKNOWN_GOSSIP: Rep = Rep::new(-(1 << 6), "Unknown gossip message engine id"); /// Reputation change when a peer sends a message from a topic it isn't registered on. pub const UNREGISTERED_TOPIC: Rep = Rep::new(-(1 << 10), "Unregistered gossip message topic"); } From 1054076c157819d43288ed7118b2964956097b36 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:07:07 +0100 Subject: [PATCH 152/201] givent -> given --- client/db/src/upgrade.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/upgrade.rs b/client/db/src/upgrade.rs index 69230e7851925..971acf8456b64 100644 --- a/client/db/src/upgrade.rs +++ b/client/db/src/upgrade.rs @@ -118,7 +118,7 @@ fn current_version(path: &Path) -> sp_blockchain::Result { } } -/// Opens database of givent type with given number of columns. +/// Opens database of given type with given number of columns. fn open_database(db_path: &Path, db_type: DatabaseType, db_columns: u32) -> sp_blockchain::Result { let db_path = db_path.to_str() .ok_or_else(|| sp_blockchain::Error::Backend("Invalid database path".into()))?; From 96a59c74b49b32f22514d69d092263160c7f7d18 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:09:53 +0100 Subject: [PATCH 153/201] immediatelly -> immediately --- client/state-db/src/noncanonical.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/state-db/src/noncanonical.rs b/client/state-db/src/noncanonical.rs index 373c1aa0da076..db2f58fa8981d 100644 --- a/client/state-db/src/noncanonical.rs +++ b/client/state-db/src/noncanonical.rs @@ -106,7 +106,7 @@ fn discard_descendants( // save to be discarded later. pinned_insertions.insert(overlay.hash.clone(), overlay.inserted); } else { - // discard immediatelly. + // discard immediately. parents.remove(&overlay.hash); discard_values(&mut values, overlay.inserted); } From 5d04ab4af4fe9c588da23c3e823316a6ed393741 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:10:38 +0100 Subject: [PATCH 154/201] slicable -> sliceable --- client/state-db/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/state-db/src/lib.rs b/client/state-db/src/lib.rs index f2722ae308068..0eab640de84e8 100644 --- a/client/state-db/src/lib.rs +++ b/client/state-db/src/lib.rs @@ -102,7 +102,7 @@ impl fmt::Debug for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Error::Db(e) => e.fmt(f), - Error::Decoding(e) => write!(f, "Error decoding slicable value: {}", e.what()), + Error::Decoding(e) => write!(f, "Error decoding sliceable value: {}", e.what()), Error::InvalidBlock => write!(f, "Trying to canonicalize invalid block"), Error::InvalidBlockNumber => write!(f, "Trying to insert block with invalid number"), Error::InvalidParent => write!(f, "Trying to insert block with unknown parent"), From 21b31baf08da8c3df417c830813564d124503d02 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:15:41 +0100 Subject: [PATCH 155/201] conensus -> consensus --- client/service/test/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index 723c13ec8225b..b65bccc151823 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -498,7 +498,7 @@ pub fn consensus( const NUM_FULL_NODES: usize = 10; const NUM_LIGHT_NODES: usize = 10; const NUM_BLOCKS: usize = 10; // 10 * 2 sec block production time = ~20 seconds - let temp = tempdir_with_prefix("substrate-conensus-test"); + let temp = tempdir_with_prefix("substrate-consensus-test"); let mut network = TestNet::new( &temp, spec.clone(), From afedbf4ec2943bf9518c1235049adb3e9aeb6fc9 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:17:00 +0100 Subject: [PATCH 156/201] Mimicks -> Mimics --- client/offchain/src/api/http.rs | 14 +++++++------- client/offchain/src/api/http_dummy.rs | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/offchain/src/api/http.rs b/client/offchain/src/api/http.rs index 84c3ecd69b37f..378a0d6162366 100644 --- a/client/offchain/src/api/http.rs +++ b/client/offchain/src/api/http.rs @@ -18,7 +18,7 @@ //! function returns a pair of [`HttpApi`] and [`HttpWorker`] that share some state. //! //! The [`HttpApi`] is (indirectly) passed to the runtime when calling an offchain worker, while -//! the [`HttpWorker`] must be processed in the background. The [`HttpApi`] mimicks the API of the +//! the [`HttpWorker`] must be processed in the background. The [`HttpApi`] mimics the API of the //! HTTP-related methods available to offchain workers. //! //! The reason for this design is driven by the fact that HTTP requests should continue running @@ -110,7 +110,7 @@ struct HttpApiRequestRp { } impl HttpApi { - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn request_start( &mut self, method: &str, @@ -138,7 +138,7 @@ impl HttpApi { Ok(new_id) } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn request_add_header( &mut self, request_id: HttpRequestId, @@ -158,7 +158,7 @@ impl HttpApi { Ok(()) } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn request_write_body( &mut self, request_id: HttpRequestId, @@ -266,7 +266,7 @@ impl HttpApi { } } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn response_wait( &mut self, ids: &[HttpRequestId], @@ -392,7 +392,7 @@ impl HttpApi { } } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn response_headers( &mut self, request_id: HttpRequestId @@ -411,7 +411,7 @@ impl HttpApi { .collect() } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn response_read_body( &mut self, request_id: HttpRequestId, diff --git a/client/offchain/src/api/http_dummy.rs b/client/offchain/src/api/http_dummy.rs index 8725c89899795..5ff77a1068312 100644 --- a/client/offchain/src/api/http_dummy.rs +++ b/client/offchain/src/api/http_dummy.rs @@ -33,7 +33,7 @@ pub struct HttpApi; pub struct HttpWorker; impl HttpApi { - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn request_start( &mut self, _: &str, @@ -43,7 +43,7 @@ impl HttpApi { Err(()) } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn request_add_header( &mut self, _: HttpRequestId, @@ -54,7 +54,7 @@ impl HttpApi { never be called; qed") } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn request_write_body( &mut self, _: HttpRequestId, @@ -65,7 +65,7 @@ impl HttpApi { never be called; qed") } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn response_wait( &mut self, requests: &[HttpRequestId], @@ -79,7 +79,7 @@ impl HttpApi { } } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn response_headers( &mut self, _: HttpRequestId @@ -88,7 +88,7 @@ impl HttpApi { never be called; qed") } - /// Mimicks the corresponding method in the offchain API. + /// Mimics the corresponding method in the offchain API. pub fn response_read_body( &mut self, _: HttpRequestId, From 9de155d30ddb89b2ddb22b739acf210393fcb192 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:17:22 +0100 Subject: [PATCH 157/201] acccept -> accept --- client/network/src/protocol/sync.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol/sync.rs b/client/network/src/protocol/sync.rs index a513d47ca4198..dd936dcb48fec 100644 --- a/client/network/src/protocol/sync.rs +++ b/client/network/src/protocol/sync.rs @@ -751,7 +751,7 @@ impl ChainSync { | PeerSyncState::DownloadingFinalityProof(..) => Vec::new() } } else { - // When request.is_none() just acccept blocks + // When request.is_none() just accept blocks blocks.into_iter().map(|b| { IncomingBlock { hash: b.hash, From b4a59487c5a55037b4852dbf115917347634fbda Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:18:03 +0100 Subject: [PATCH 158/201] serialise -> serialize --- client/network/src/protocol/light_client_handler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/network/src/protocol/light_client_handler.rs b/client/network/src/protocol/light_client_handler.rs index f5be23c0d4d49..cea08aec96a90 100644 --- a/client/network/src/protocol/light_client_handler.rs +++ b/client/network/src/protocol/light_client_handler.rs @@ -834,10 +834,10 @@ where }; if let Some(peer) = available_peer { let id = self.next_request_id(); - let rq = serialise_request(id, &request.request); + let rq = serialize_request(id, &request.request); let mut buf = Vec::with_capacity(rq.encoded_len()); if let Err(e) = rq.encode(&mut buf) { - log::debug!("failed to serialise request {}: {}", id, e); + log::debug!("failed to serialize request {}: {}", id, e); send_reply(Err(ClientError::RemoteFetchFailed), request.request) } else { log::trace!("sending request {} to peer {}", id, peer); @@ -915,7 +915,7 @@ fn retries(request: &Request) -> usize { rc.unwrap_or(0) } -fn serialise_request(id: u64, request: &Request) -> api::v1::light::Request { +fn serialize_request(id: u64, request: &Request) -> api::v1::light::Request { let request = match request { Request::Header { request, .. } => { let r = api::v1::light::RemoteHeaderRequest { block: request.block.encode() }; @@ -1049,7 +1049,7 @@ where /// Sends a request to remote and awaits the response. #[derive(Debug, Clone)] pub struct OutboundProtocol { - /// The serialised protobuf request. + /// The serialized protobuf request. request: Vec, /// The max. request length in bytes. max_data_size: usize, From 9c3f21a6df43ef5cf2328a3f7c6075dc6ba7ae15 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:20:03 +0100 Subject: [PATCH 159/201] exstrinsics -> extrinsics --- client/network/src/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index 8e5f9d6e7bc8f..6baebe9003ac4 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -81,7 +81,7 @@ pub use light_client_handler::LightClientHandler; const REQUEST_TIMEOUT_SEC: u64 = 40; /// Interval at which we perform time based maintenance const TICK_TIMEOUT: time::Duration = time::Duration::from_millis(1100); -/// Interval at which we propagate exstrinsics; +/// Interval at which we propagate extrinsics; const PROPAGATE_TIMEOUT: time::Duration = time::Duration::from_millis(2900); /// Maximim number of known block hashes to keep for a peer. From 5436b5613c67c680ce6d210d45d5da3ed80eafb2 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:24:27 +0100 Subject: [PATCH 160/201] panicks -> panics --- client/offchain/src/api/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/offchain/src/api/http.rs b/client/offchain/src/api/http.rs index 378a0d6162366..7aa0963fcf5aa 100644 --- a/client/offchain/src/api/http.rs +++ b/client/offchain/src/api/http.rs @@ -947,7 +947,7 @@ mod tests { #[test] fn fuzzing() { - // Uses the API in random ways to try to trigger panicks. + // Uses the API in random ways to try to trigger panics. // Doesn't test some paths, such as waiting for multiple requests. Also doesn't test what // happens if the server force-closes our socket. From 9fa2108f89472a6741faae72dda73d4ee734be5d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:24:41 +0100 Subject: [PATCH 161/201] maintaince -> maintenance --- client/transaction-pool/src/testing/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/transaction-pool/src/testing/pool.rs b/client/transaction-pool/src/testing/pool.rs index 4a4f4638df504..7daefe4d832c0 100644 --- a/client/transaction-pool/src/testing/pool.rs +++ b/client/transaction-pool/src/testing/pool.rs @@ -206,7 +206,7 @@ fn should_revalidate_during_maintenance() { } #[test] -fn should_resubmit_from_retracted_during_maintaince() { +fn should_resubmit_from_retracted_during_maintenance() { let xt = uxt(Alice, 209); let retracted_hash = Hash::random(); From a0c2c36aeaf0d339e3d7fc304b43f1b6df6fc0e4 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:26:24 +0100 Subject: [PATCH 162/201] repeatidely -> repeatedly --- client/network/test/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/test/src/lib.rs b/client/network/test/src/lib.rs index 22e340a2a81b3..4b73ee3996c63 100644 --- a/client/network/test/src/lib.rs +++ b/client/network/test/src/lib.rs @@ -758,7 +758,7 @@ pub trait TestNetFactory: Sized { /// Blocks the current thread until we are sync'ed. /// - /// Calls `poll_until_sync` repeatidely with the runtime passed as parameter. + /// Calls `poll_until_sync` repeatedly with the runtime passed as parameter. fn block_until_sync(&mut self, runtime: &mut tokio::runtime::current_thread::Runtime) { runtime.block_on(futures::future::poll_fn::<(), (), _>(|| Ok(self.poll_until_sync()))).unwrap(); } From bae0601b4316b49b783d58908d349f09899907eb Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:27:04 +0100 Subject: [PATCH 163/201] anecstor -> ancestor --- client/network/src/protocol/sync/extra_requests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol/sync/extra_requests.rs b/client/network/src/protocol/sync/extra_requests.rs index a5fb232b8d159..19c6b50743788 100644 --- a/client/network/src/protocol/sync/extra_requests.rs +++ b/client/network/src/protocol/sync/extra_requests.rs @@ -469,7 +469,7 @@ mod tests { } #[test] - fn anecstor_roots_are_finalized_when_finality_notification_is_missed() { + fn ancestor_roots_are_finalized_when_finality_notification_is_missed() { let mut finality_proofs = ExtraRequests::::new("test"); let hash4 = [4; 32].into(); From a2f1d252c85c2ab9ae6329d50f69af1d4fb316b1 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:27:21 +0100 Subject: [PATCH 164/201] becasue -> because --- client/network/src/protocol/sync.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol/sync.rs b/client/network/src/protocol/sync.rs index dd936dcb48fec..3b909b3303fee 100644 --- a/client/network/src/protocol/sync.rs +++ b/client/network/src/protocol/sync.rs @@ -955,7 +955,7 @@ impl ChainSync { }, Err(BlockImportError::MissingState) => { // This may happen if the chain we were requesting upon has been discarded - // in the meantime becasue other chain has been finalized. + // in the meantime because other chain has been finalized. // Don't mark it as bad as it still may be synced if explicitly requested. trace!(target: "sync", "Obsolete block"); }, From fb62813c4d446dac6f8a0cb75f764e6adb566de1 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:28:26 +0100 Subject: [PATCH 165/201] processer -> processor --- client/network/src/protocol/light_dispatch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol/light_dispatch.rs b/client/network/src/protocol/light_dispatch.rs index b26d18b89c3de..9d5ea6fbaf898 100644 --- a/client/network/src/protocol/light_dispatch.rs +++ b/client/network/src/protocol/light_dispatch.rs @@ -227,7 +227,7 @@ impl FetchChecker for AlwaysBadChecker { impl LightDispatch where B::Header: HeaderT, { - /// Creates new light client requests processer. + /// Creates new light client requests processor. pub fn new(checker: Arc>) -> Self { LightDispatch { checker, From 483d4d760656bfaac1a9acc41295d67946f7c23d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:29:04 +0100 Subject: [PATCH 166/201] Prunning -> Pruning --- client/transaction-pool/graph/src/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/transaction-pool/graph/src/pool.rs b/client/transaction-pool/graph/src/pool.rs index 392abdca4899c..0037e0dd5c004 100644 --- a/client/transaction-pool/graph/src/pool.rs +++ b/client/transaction-pool/graph/src/pool.rs @@ -327,7 +327,7 @@ impl Pool { let reverified_transactions = self.verify(at, pruned_transactions, false).await?; - log::trace!(target: "txpool", "Prunning at {:?}. Resubmitting transactions.", at); + log::trace!(target: "txpool", "Pruning at {:?}. Resubmitting transactions.", at); // And finally - submit reverified transactions back to the pool self.validated_pool.resubmit_pruned( From edc7587c401b6f17d37c102c7da42bff6d17297f Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:29:40 +0100 Subject: [PATCH 167/201] insterested -> interested --- client/network/src/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index 6baebe9003ac4..8f684e8988966 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -183,7 +183,7 @@ struct Peer { info: PeerInfo, /// Current block request, if any. block_request: Option<(Instant, message::BlockRequest)>, - /// Requests we are no longer insterested in. + /// Requests we are no longer interested in. obsolete_requests: HashMap, /// Holds a set of transactions known to this peer. known_extrinsics: LruHashSet, From a7ddd92c9f19434e6b4f639494a6afcf928bce35 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:30:27 +0100 Subject: [PATCH 168/201] unuseful -> not useful --- client/network/src/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index 8f684e8988966..daedd3b61f791 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -97,7 +97,7 @@ pub(crate) const MIN_VERSION: u32 = 3; // Maximum allowed entries in `BlockResponse` const MAX_BLOCK_DATA_RESPONSE: u32 = 128; /// When light node connects to the full node and the full node is behind light node -/// for at least `LIGHT_MAXIMAL_BLOCKS_DIFFERENCE` blocks, we consider it unuseful +/// for at least `LIGHT_MAXIMAL_BLOCKS_DIFFERENCE` blocks, we consider it not useful /// and disconnect to free connection slot. const LIGHT_MAXIMAL_BLOCKS_DIFFERENCE: u64 = 8192; From a21dab94f59c73992aba9b6dd6dee2d159fe6fe3 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:31:33 +0100 Subject: [PATCH 169/201] yeided -> yielded --- client/network/src/discovery.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/discovery.rs b/client/network/src/discovery.rs index 2da69e1894457..8da39c311a47d 100644 --- a/client/network/src/discovery.rs +++ b/client/network/src/discovery.rs @@ -194,7 +194,7 @@ pub enum DiscoveryOut { /// e.g. obtained through the `identify` protocol. UnroutablePeer(PeerId), - /// The DHT yeided results for the record request, grouped in (key, value) pairs. + /// The DHT yielded results for the record request, grouped in (key, value) pairs. ValueFound(Vec<(record::Key, Vec)>), /// The record requested was not found in the DHT. From ba540866e4003b8a904975623b98dfe32340c648 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:33:20 +0100 Subject: [PATCH 170/201] descendfing -> descending --- client/network/src/protocol/schema/api.v1.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/network/src/protocol/schema/api.v1.proto b/client/network/src/protocol/schema/api.v1.proto index e4c32ec585d9c..73128c53de466 100644 --- a/client/network/src/protocol/schema/api.v1.proto +++ b/client/network/src/protocol/schema/api.v1.proto @@ -8,7 +8,7 @@ package api.v1; enum Direction { // Enumerate in ascending order (from child to parent). Ascending = 0; - // Enumerate in descendfing order (from parent to canonical child). + // Enumerate in descending order (from parent to canonical child). Descending = 1; } From 1968060e004857c1b5342393ec75bcfff8d1bdd2 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:33:43 +0100 Subject: [PATCH 171/201] corresponts -> corresponds --- client/state-db/src/pruning.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/state-db/src/pruning.rs b/client/state-db/src/pruning.rs index a993df4f111ac..30982fda4ede8 100644 --- a/client/state-db/src/pruning.rs +++ b/client/state-db/src/pruning.rs @@ -36,7 +36,7 @@ pub struct RefWindow { death_rows: VecDeque>, /// An index that maps each key from `death_rows` to block number. death_index: HashMap, - /// Block number that corresponts to the front of `death_rows` + /// Block number that corresponds to the front of `death_rows` pending_number: u64, /// Number of call of `note_canonical` after /// last call `apply_pending` or `revert_pending` From 15a59e1f0dc2b96800df6ec4bee73b74bd7c18ad Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:34:20 +0100 Subject: [PATCH 172/201] survivew -> survive --- client/state-db/src/pruning.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/state-db/src/pruning.rs b/client/state-db/src/pruning.rs index 30982fda4ede8..abcf36c7e6821 100644 --- a/client/state-db/src/pruning.rs +++ b/client/state-db/src/pruning.rs @@ -348,7 +348,7 @@ mod tests { } #[test] - fn reinserted_survivew_pending() { + fn reinserted_survive_pending() { let mut db = make_db(&[1, 2, 3]); let mut pruning: RefWindow = RefWindow::new(&db).unwrap(); let mut commit = make_commit(&[], &[2]); From b2af247419567d76fd599f7b6b6748f972b38a86 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:35:06 +0100 Subject: [PATCH 173/201] keps -> keeps --- client/db/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index e857715463b7d..5173497509cf9 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -741,7 +741,7 @@ impl FrozenForDuration { /// Disk backend. /// -/// Disk backend keps data in a key-value store. In archive mode, trie nodes are kept from all blocks. +/// Disk backend keeps data in a key-value store. In archive mode, trie nodes are kept from all blocks. /// Otherwise, trie nodes are kept only from some recent blocks. pub struct Backend { storage: Arc>, From c073b106af9e32920cf1f3d9813108430a386a56 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:35:29 +0100 Subject: [PATCH 174/201] ligh -> light --- client/finality-grandpa/src/finality_proof.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/finality_proof.rs b/client/finality-grandpa/src/finality_proof.rs index aaa9a1f746660..9da99ab531ae5 100644 --- a/client/finality-grandpa/src/finality_proof.rs +++ b/client/finality-grandpa/src/finality_proof.rs @@ -1004,7 +1004,7 @@ pub(crate) mod tests { #[test] fn finality_proof_is_none_if_first_justification_is_generated_by_unknown_set() { // this is the case for forced change: set_id has been forcibly increased on full node - // and ligh node missed that + // and light node missed that // => justification verification will fail on light node anyways, so we do not return // finality proof at all let blockchain = test_blockchain(); From 8378f522bc4b9ee4c634afc1119cbad88d70877b Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:36:40 +0100 Subject: [PATCH 175/201] prerequisities -> prerequisites --- utils/wasm-builder/README.md | 2 +- utils/wasm-builder/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/wasm-builder/README.md b/utils/wasm-builder/README.md index b21c588ac383c..2fd9a6ab4cf80 100644 --- a/utils/wasm-builder/README.md +++ b/utils/wasm-builder/README.md @@ -57,7 +57,7 @@ be `NODE_RUNTIME`. ## Prerequisites: -WASM builder requires the following prerequisities for building the WASM binary: +WASM builder requires the following prerequisites for building the WASM binary: - rust nightly + `wasm32-unknown-unknown` toolchain diff --git a/utils/wasm-builder/src/lib.rs b/utils/wasm-builder/src/lib.rs index 80192eb3613ce..8500eba4a01f4 100644 --- a/utils/wasm-builder/src/lib.rs +++ b/utils/wasm-builder/src/lib.rs @@ -73,7 +73,7 @@ //! //! ## Prerequisites: //! -//! WASM builder requires the following prerequisities for building the WASM binary: +//! WASM builder requires the following prerequisites for building the WASM binary: //! //! - rust nightly + `wasm32-unknown-unknown` toolchain //! From 54408c5e7a500932c4055f38c537173f94accdae Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:37:05 +0100 Subject: [PATCH 176/201] positiion -> position --- utils/fork-tree/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/fork-tree/src/lib.rs b/utils/fork-tree/src/lib.rs index 8e1918fed98ec..d0cf9c9f37ece 100644 --- a/utils/fork-tree/src/lib.rs +++ b/utils/fork-tree/src/lib.rs @@ -283,7 +283,7 @@ impl ForkTree where .map(|position| self.finalize_root_at(position)) } - /// Finalize root at given positiion. See `finalize_root` comment for details. + /// Finalize root at given position. See `finalize_root` comment for details. fn finalize_root_at(&mut self, position: usize) -> V { let node = self.roots.swap_remove(position); self.roots = node.children; From dff7f6880a15146fc039da8469a24eb776a026ae Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:37:52 +0100 Subject: [PATCH 177/201] depedency -> dependency --- utils/wasm-builder/src/wasm_project.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/wasm-builder/src/wasm_project.rs b/utils/wasm-builder/src/wasm_project.rs index c9b573ff1940f..60be4684ba893 100644 --- a/utils/wasm-builder/src/wasm_project.rs +++ b/utils/wasm-builder/src/wasm_project.rs @@ -431,7 +431,7 @@ fn generate_rerun_if_changed_instructions( .exec() .expect("`cargo metadata` can not fail!"); - // Make sure that if any file/folder of a depedency change, we need to rerun the `build.rs` + // Make sure that if any file/folder of a dependency change, we need to rerun the `build.rs` metadata.packages.into_iter() .filter(|package| !package.manifest_path.starts_with(wasm_workspace)) .for_each(|package| { From 1ae36884f6876ea59636e6e5e9854714c728adee Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:38:36 +0100 Subject: [PATCH 178/201] extrinisic -> extrinsic --- test-utils/runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-utils/runtime/src/lib.rs b/test-utils/runtime/src/lib.rs index e01da8a9fcd0c..ed32cbef9ca5c 100644 --- a/test-utils/runtime/src/lib.rs +++ b/test-utils/runtime/src/lib.rs @@ -114,7 +114,7 @@ pub enum Extrinsic { ChangesTrieConfigUpdate(Option), } -parity_util_mem::malloc_size_of_is_0!(Extrinsic); // non-opaque extrinisic does not need this +parity_util_mem::malloc_size_of_is_0!(Extrinsic); // non-opaque extrinsic does not need this #[cfg(feature = "std")] impl serde::Serialize for Extrinsic { From 908879d6cb2b49bb7e0b2b3674daf62341e633b4 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:40:17 +0100 Subject: [PATCH 179/201] atomicaly -> atomically --- primitives/runtime/src/offchain/storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/runtime/src/offchain/storage.rs b/primitives/runtime/src/offchain/storage.rs index b9aab82333683..681bc14451e11 100644 --- a/primitives/runtime/src/offchain/storage.rs +++ b/primitives/runtime/src/offchain/storage.rs @@ -61,7 +61,7 @@ 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: From 3409cfa6a0963644d91cec7b43173ce4eda91110 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:44:56 +0100 Subject: [PATCH 180/201] staticly -> statically --- bin/node/rpc-client/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/rpc-client/src/main.rs b/bin/node/rpc-client/src/main.rs index b28c9f8ff6392..4b735bad85d20 100644 --- a/bin/node/rpc-client/src/main.rs +++ b/bin/node/rpc-client/src/main.rs @@ -19,7 +19,7 @@ //! Example substrate RPC client code. //! //! This module shows how you can write a Rust RPC client that connects to a running -//! substrate node and use staticly typed RPC wrappers. +//! substrate node and use statically typed RPC wrappers. use futures::Future; use hyper::rt; From 055361d5a844a3c118917797048ed7c12b582446 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:45:07 +0100 Subject: [PATCH 181/201] resul -> result --- bin/node/rpc-client/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/rpc-client/src/main.rs b/bin/node/rpc-client/src/main.rs index 4b735bad85d20..c547d30002d79 100644 --- a/bin/node/rpc-client/src/main.rs +++ b/bin/node/rpc-client/src/main.rs @@ -55,7 +55,7 @@ fn main() { /// 1. Calls the `pending_extrinsics` method to get all extrinsics in the pool. /// 2. Then calls `remove_extrinsic` passing the obtained raw extrinsics. /// -/// As the resul of running the code the entire content of the transaction pool is going +/// As the result of running the code the entire content of the transaction pool is going /// to be removed and the extrinsics are going to be temporarily banned. fn remove_all_extrinsics(client: AuthorClient) -> impl Future { client.pending_extrinsics() From fc8ba3ab9528dbb1ac6f6d43ebac21a8a149c4a6 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:46:25 +0100 Subject: [PATCH 182/201] timestamb -> timestamp --- bin/node/testing/benches/import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/testing/benches/import.rs b/bin/node/testing/benches/import.rs index 86092a7836015..1063cb836cace 100644 --- a/bin/node/testing/benches/import.rs +++ b/bin/node/testing/benches/import.rs @@ -292,7 +292,7 @@ fn generate_block_import(client: &Client, keyring: &BenchKeyring) -> Block { let mut inherent_data = InherentData::new(); inherent_data.put_data(sp_timestamp::INHERENT_IDENTIFIER, ×tamp) - .expect("Put timestamb failed"); + .expect("Put timestamp failed"); inherent_data.put_data(sp_finality_tracker::INHERENT_IDENTIFIER, &0) .expect("Put finality tracker failed"); From 94089071c7261a24954c114ff3681db080504e74 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:46:54 +0100 Subject: [PATCH 183/201] Utilites -> Utilities --- bin/node/testing/src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/testing/src/client.rs b/bin/node/testing/src/client.rs index 29b086c3c1197..963bac7041b7d 100644 --- a/bin/node/testing/src/client.rs +++ b/bin/node/testing/src/client.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Utilites to build a `TestClient` for `node-runtime`. +//! Utilities to build a `TestClient` for `node-runtime`. use sp_runtime::BuildStorage; From b31265bb30cb82118f3bcc36db91166dd6240b14 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:48:32 +0100 Subject: [PATCH 184/201] ammount -> amount --- bin/node/cli/tests/common.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/cli/tests/common.rs b/bin/node/cli/tests/common.rs index 96060bf85d9f1..d5ec3cd18154d 100644 --- a/bin/node/cli/tests/common.rs +++ b/bin/node/cli/tests/common.rs @@ -16,7 +16,7 @@ use std::{process::{Child, ExitStatus}, thread, time::Duration}; -/// Wait for the given `child` the given ammount of `secs`. +/// Wait for the given `child` the given amount of `secs`. /// /// Returns the `Some(exit status)` or `None` if the process did not finish in the given time. pub fn wait_for(child: &mut Child, secs: usize) -> Option { From 49946845ec00d4df90bf50f07926c38b3f64dc46 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:48:48 +0100 Subject: [PATCH 185/201] pocess -> process --- bin/node/cli/tests/running_the_node_and_interrupt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/cli/tests/running_the_node_and_interrupt.rs b/bin/node/cli/tests/running_the_node_and_interrupt.rs index 6ab719de9196d..dbb57bdd21ab8 100644 --- a/bin/node/cli/tests/running_the_node_and_interrupt.rs +++ b/bin/node/cli/tests/running_the_node_and_interrupt.rs @@ -38,7 +38,7 @@ fn running_the_node_works_and_can_be_interrupted() { assert_eq!( common::wait_for(&mut cmd, 30).map(|x| x.success()), Some(true), - "the pocess must exit gracefully after signal {}", + "the process must exit gracefully after signal {}", signal, ); } From 579b91db652409bcbd69e97b34d650883d18d247 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 18:50:44 +0100 Subject: [PATCH 186/201] exteral -> external --- .maintain/kubernetes/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maintain/kubernetes/templates/service.yaml b/.maintain/kubernetes/templates/service.yaml index 01ba9d5a567c5..b14bb74c10a1a 100644 --- a/.maintain/kubernetes/templates/service.yaml +++ b/.maintain/kubernetes/templates/service.yaml @@ -33,7 +33,7 @@ spec: app: {{ .Values.GitlabEnvSlug | default .Values.app }} sessionAffinity: None type: NodePort - # don't route exteral traffic to non-local pods + # don't route external traffic to non-local pods externalTrafficPolicy: Local {{- else if .Values.validator.keys }} {{- $root := . -}} From fdee85524851ab3162d886f1715280256519d3d2 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sat, 15 Feb 2020 20:14:11 +0100 Subject: [PATCH 187/201] Update client/finality-grandpa/src/tests.rs --- client/finality-grandpa/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index a3a2f6ae79d17..88f33a57e2752 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -982,7 +982,7 @@ fn force_change_to_new_set() { // it will only finalize if the forced transition happens. // we add_blocks after the voters are spawned because otherwise - // the link-halveshave the wrong AuthoritySet + // the link-halves have the wrong AuthoritySet run_to_completion(&mut runtime, 25, net, peers_a); } From a59d926f388c3b1a1aa193378c75c58dba90f7d5 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:01:32 +0100 Subject: [PATCH 188/201] Update primitives/io/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- primitives/io/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index 715091e3e269b..a1e9181f28357 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -594,7 +594,7 @@ pub trait Offchain { /// Returns a random seed. /// - /// This is a truly 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::() From eece55092d3f048c9b10e18a11dcefba8e8c5ea6 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:01:56 +0100 Subject: [PATCH 189/201] Update primitives/blockchain/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- primitives/blockchain/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/blockchain/src/lib.rs b/primitives/blockchain/src/lib.rs index 422d8c5a0188b..8f83c7aec5d9d 100644 --- a/primitives/blockchain/src/lib.rs +++ b/primitives/blockchain/src/lib.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Substrate blockchain traits and primitives +//! Substrate blockchain traits and primitives. mod backend; mod header_metadata; From 632be0b145b66f3191f35d2b8f9fdf06891e470f Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:02:10 +0100 Subject: [PATCH 190/201] Update frame/support/src/weights.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- frame/support/src/weights.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/src/weights.rs b/frame/support/src/weights.rs index 5407dc436045c..60f0d4a8b2b64 100644 --- a/frame/support/src/weights.rs +++ b/frame/support/src/weights.rs @@ -67,7 +67,7 @@ pub trait ClassifyDispatch { fn classify_dispatch(&self, target: T) -> DispatchClass; } -/// Means of determining the weight of a block's life cycle hooks: on_initialize, on_finalize and +/// Means of determining the weight of a block's life cycle hooks: `on_initialize`, `on_finalize` and /// such. pub trait WeighBlock { /// Return the weight of the block's on_initialize hook. From fcb3cecf1cdfaf21963f833dcce03957c953a631 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:02:36 +0100 Subject: [PATCH 191/201] Update bin/node/cli/tests/common.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- bin/node/cli/tests/common.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/cli/tests/common.rs b/bin/node/cli/tests/common.rs index d5ec3cd18154d..4044f69d08168 100644 --- a/bin/node/cli/tests/common.rs +++ b/bin/node/cli/tests/common.rs @@ -16,7 +16,7 @@ use std::{process::{Child, ExitStatus}, thread, time::Duration}; -/// Wait for the given `child` the given amount of `secs`. +/// Wait for the given `child` the given number of `secs`. /// /// Returns the `Some(exit status)` or `None` if the process did not finish in the given time. pub fn wait_for(child: &mut Child, secs: usize) -> Option { From fcf26d1d8edb6c0bab66230a6cdac570b2241dd5 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:02:46 +0100 Subject: [PATCH 192/201] Update client/api/src/execution_extensions.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- client/api/src/execution_extensions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index bade5db265929..c3574d08d4fe4 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -64,7 +64,7 @@ impl Default for ExecutionStrategies { /// Generate the starting set of ExternalitiesExtensions based upon the given capabilities pub trait ExtensionsFactory: Send + Sync { - /// Make `Extensions` for given Capabilities + /// Make `Extensions` for given `Capabilities`. fn extensions_for(&self, capabilities: offchain::Capabilities) -> Extensions; } From ad1d851113e7750e44fd661a86e95c5520b1045f Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:03:27 +0100 Subject: [PATCH 193/201] Update client/cli/src/params.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- client/cli/src/params.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 40ca0ac87b0b6..9ae7bd7748114 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -718,7 +718,7 @@ pub struct BuildSpecCmd { pub node_key_params: NodeKeyParams, } -/// Wrapper type of `String` which holds an arbitrary sized unsigned integer formatted as decimal. +/// Wrapper type of `String` that holds an unsigned integer of arbitrary size, formatted as a decimal. #[derive(Debug, Clone)] pub struct BlockNumber(String); @@ -1266,4 +1266,3 @@ impl BenchmarkCmd { Ok(()) } } - From 49a1512e0ecc563fec3c2c9aca9a59252e789e07 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:03:43 +0100 Subject: [PATCH 194/201] Update client/executor/common/src/sandbox.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- client/executor/common/src/sandbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/executor/common/src/sandbox.rs b/client/executor/common/src/sandbox.rs index d002d83d3ca37..ccfdc2f3e0e28 100644 --- a/client/executor/common/src/sandbox.rs +++ b/client/executor/common/src/sandbox.rs @@ -498,7 +498,7 @@ pub fn instantiate<'a, FE: SandboxCapabilities>( /// /// This is generic over a supervisor function reference type. pub struct Store { - // Memories and instances are `Some` until torndown. + // Memories and instances are `Some` until torn down. instances: Vec>>>, memories: Vec>, } From 95a0f2609f4224eff9dacfa2a6d88603cae790c2 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:04:18 +0100 Subject: [PATCH 195/201] Update client/api/src/execution_extensions.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- client/api/src/execution_extensions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index c3574d08d4fe4..86ad12475c7d1 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -77,7 +77,7 @@ impl ExtensionsFactory for () { /// A producer of execution extensions for offchain calls. /// /// This crate aggregates extensions available for the offchain calls -/// and is responsible to produce a right `Extensions` object +/// and is responsible for producing a right `Extensions` object. /// for each call, based on required `Capabilities`. pub struct ExecutionExtensions { strategies: ExecutionStrategies, From f0cc1ec13c978b8a7fcfd937c2adb335fa6a0fcb Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:15:51 +0100 Subject: [PATCH 196/201] Update client/finality-grandpa/src/communication/mod.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- client/finality-grandpa/src/communication/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index 7159910c19e66..050a3c8642fde 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -154,7 +154,7 @@ pub(crate) struct NetworkBridge> { /// `NeighborPacketWorker` processing packets sent through the `NeighborPacketSender`. // // `NetworkBridge` is required to be cloneable, thus one needs to be able to clone its children, - // thus one has to wrap neighbor_packet_worker with an `Arc` `Mutex`. + // thus one has to wrap `neighbor_packet_worker` with an `Arc` `Mutex`. neighbor_packet_worker: Arc>>, /// Receiver side of the peer report stream populated by the gossip validator, forwarded to the From 2fc2704f802ac9d307cf2808529ab86864998363 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:16:10 +0100 Subject: [PATCH 197/201] Update client/state-db/src/pruning.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- client/state-db/src/pruning.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/state-db/src/pruning.rs b/client/state-db/src/pruning.rs index abcf36c7e6821..71d018087b590 100644 --- a/client/state-db/src/pruning.rs +++ b/client/state-db/src/pruning.rs @@ -36,7 +36,7 @@ pub struct RefWindow { death_rows: VecDeque>, /// An index that maps each key from `death_rows` to block number. death_index: HashMap, - /// Block number that corresponds to the front of `death_rows` + /// Block number that corresponds to the front of `death_rows`. pending_number: u64, /// Number of call of `note_canonical` after /// last call `apply_pending` or `revert_pending` From 25c7499986bbe13aeb45c5fdc7f370f86fa90e78 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:56:26 +0100 Subject: [PATCH 198/201] Update frame/contracts/src/tests.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- frame/contracts/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 664fed3a4d89f..ddd532334c158 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -1052,7 +1052,7 @@ fn claim_surcharge_malus() { } /// Claim surcharge with the given trigger_call at the given blocks. -/// if removes is true then assert that the contract is a tombstone +/// If `removes` is true then assert that the contract is a tombstone. fn claim_surcharge(blocks: u64, trigger_call: impl Fn() -> bool, removes: bool) { let (wasm, code_hash) = compile_module::(CODE_SET_RENT).unwrap(); From 4f756f5369a57307d04ba90c4b32bd0becbfe3ba Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Sun, 16 Feb 2020 00:58:41 +0100 Subject: [PATCH 199/201] Update client/api/src/execution_extensions.rs --- client/api/src/execution_extensions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index 86ad12475c7d1..10d33c20e679c 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -77,7 +77,7 @@ impl ExtensionsFactory for () { /// A producer of execution extensions for offchain calls. /// /// This crate aggregates extensions available for the offchain calls -/// and is responsible for producing a right `Extensions` object. +/// and is responsible for producing a correct `Extensions` object. /// for each call, based on required `Capabilities`. pub struct ExecutionExtensions { strategies: ExecutionStrategies, From 3817bd724c3ade6e60cd45fee491a24b5d18cc4d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Mon, 17 Feb 2020 10:31:18 +0100 Subject: [PATCH 200/201] bump impl --- bin/node/runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index e4187c8cda6f1..a34840f17990c 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -83,7 +83,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 219, - impl_version: 0, + impl_version: 1, apis: RUNTIME_API_VERSIONS, }; From 64540b0d021a5e6f15e6e61c70aa391d01f65993 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Mon, 17 Feb 2020 14:03:43 +0100 Subject: [PATCH 201/201] timestamb -> timestamp --- bin/node/testing/benches/import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node/testing/benches/import.rs b/bin/node/testing/benches/import.rs index 9ffeb4ffd7ee9..b294ae3604e1e 100644 --- a/bin/node/testing/benches/import.rs +++ b/bin/node/testing/benches/import.rs @@ -174,7 +174,7 @@ impl BenchDb { let mut inherent_data = InherentData::new(); inherent_data.put_data(sp_timestamp::INHERENT_IDENTIFIER, ×tamp) - .expect("Put timestamb failed"); + .expect("Put timestamp failed"); inherent_data.put_data(sp_finality_tracker::INHERENT_IDENTIFIER, &0) .expect("Put finality tracker failed");