Fix spelling mistakes across the whole repository (#3808)

**Update:** Pushed additional changes based on the review comments.

**This pull request fixes various spelling mistakes in this
repository.**

Most of the changes are contained in the first **3** commits:

- `Fix spelling mistakes in comments and docs`

- `Fix spelling mistakes in test names`

- `Fix spelling mistakes in error messages, panic messages, logs and
tracing`

Other source code spelling mistakes are separated into individual
commits for easier reviewing:

- `Fix the spelling of 'authority'`

- `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'`

- `Fix the spelling of 'prev_enqueud_messages'`

- `Fix the spelling of 'endpoint'`

- `Fix the spelling of 'children'`

- `Fix the spelling of 'PenpalSiblingSovereignAccount'`

- `Fix the spelling of 'PenpalSudoAccount'`

- `Fix the spelling of 'insufficient'`

- `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'`

- `Fix the spelling of 'subtracted'`

- `Fix the spelling of 'CandidatePendingAvailability'`

- `Fix the spelling of 'exclusive'`

- `Fix the spelling of 'until'`

- `Fix the spelling of 'discriminator'`

- `Fix the spelling of 'nonexistent'`

- `Fix the spelling of 'subsystem'`

- `Fix the spelling of 'indices'`

- `Fix the spelling of 'committed'`

- `Fix the spelling of 'topology'`

- `Fix the spelling of 'response'`

- `Fix the spelling of 'beneficiary'`

- `Fix the spelling of 'formatted'`

- `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'`

- `Fix the spelling of 'succeeded'`

- `Fix the spelling of 'reopened'`

- `Fix the spelling of 'proposer'`

- `Fix the spelling of 'InstantiationNonce'`

- `Fix the spelling of 'depositor'`

- `Fix the spelling of 'expiration'`

- `Fix the spelling of 'phantom'`

- `Fix the spelling of 'AggregatedKeyValue'`

- `Fix the spelling of 'randomness'`

- `Fix the spelling of 'defendant'`

- `Fix the spelling of 'AquaticMammal'`

- `Fix the spelling of 'transactions'`

- `Fix the spelling of 'PassingTracingSubscriber'`

- `Fix the spelling of 'TxSignaturePayload'`

- `Fix the spelling of 'versioning'`

- `Fix the spelling of 'descendant'`

- `Fix the spelling of 'overridden'`

- `Fix the spelling of 'network'`

Let me know if this structure is adequate.

**Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`,
`Merkelization`, `Merkleization`, is somewhat inconsistent but I left it
as it is.

~~**Note:** In some places the term `Receival` is used to refer to
message reception, IMO `Reception` is the correct word here, but I left
it as it is.~~

~~**Note:** In some places the term `Overlayed` is used instead of the
more acceptable version `Overlaid` but I also left it as it is.~~

~~**Note:** In some places the term `Applyable` is used instead of the
correct version `Applicable` but I also left it as it is.~~

**Note:** Some usage of British vs American english e.g. `judgement` vs
`judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc.
are both present in different places, but I suppose that's
understandable given the number of contributors.

~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it
triggers errors in CI when I make changes to it, so I left it as it
is.~~
This commit is contained in:
Dcompoze
2024-03-26 13:57:57 +00:00
committed by GitHub
parent b839c995c0
commit 002d9260f9
463 changed files with 1119 additions and 1017 deletions
+17 -17
View File
@@ -122,7 +122,7 @@ use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use frame_support::traits::{
dynamic_params::{AggregratedKeyValue, IntoKey, Key, RuntimeParameterStore, TryIntoKey},
dynamic_params::{AggregatedKeyValue, IntoKey, Key, RuntimeParameterStore, TryIntoKey},
EnsureOriginWithArg,
};
@@ -135,10 +135,10 @@ pub use pallet::*;
pub use weights::WeightInfo;
/// The key type of a parameter.
type KeyOf<T> = <<T as Config>::RuntimeParameters as AggregratedKeyValue>::Key;
type KeyOf<T> = <<T as Config>::RuntimeParameters as AggregatedKeyValue>::Key;
/// The value type of a parameter.
type ValueOf<T> = <<T as Config>::RuntimeParameters as AggregratedKeyValue>::Value;
type ValueOf<T> = <<T as Config>::RuntimeParameters as AggregatedKeyValue>::Value;
#[frame_support::pallet]
pub mod pallet {
@@ -154,7 +154,7 @@ pub mod pallet {
///
/// Usually created by [`frame_support::dynamic_params`] or equivalent.
#[pallet::no_default_bounds]
type RuntimeParameters: AggregratedKeyValue;
type RuntimeParameters: AggregatedKeyValue;
/// The origin which may update a parameter.
///
@@ -175,11 +175,11 @@ pub mod pallet {
/// Is also emitted when the value was not changed.
Updated {
/// The key that was updated.
key: <T::RuntimeParameters as AggregratedKeyValue>::Key,
key: <T::RuntimeParameters as AggregatedKeyValue>::Key,
/// The old value before this call.
old_value: Option<<T::RuntimeParameters as AggregratedKeyValue>::Value>,
old_value: Option<<T::RuntimeParameters as AggregatedKeyValue>::Value>,
/// The new value after this call.
new_value: Option<<T::RuntimeParameters as AggregratedKeyValue>::Value>,
new_value: Option<<T::RuntimeParameters as AggregatedKeyValue>::Value>,
},
}
@@ -245,23 +245,23 @@ pub mod pallet {
}
impl<T: Config> RuntimeParameterStore for Pallet<T> {
type AggregratedKeyValue = T::RuntimeParameters;
type AggregatedKeyValue = T::RuntimeParameters;
fn get<KV, K>(key: K) -> Option<K::Value>
where
KV: AggregratedKeyValue,
K: Key + Into<<KV as AggregratedKeyValue>::Key>,
<KV as AggregratedKeyValue>::Key: IntoKey<
<<Self as RuntimeParameterStore>::AggregratedKeyValue as AggregratedKeyValue>::Key,
KV: AggregatedKeyValue,
K: Key + Into<<KV as AggregatedKeyValue>::Key>,
<KV as AggregatedKeyValue>::Key: IntoKey<
<<Self as RuntimeParameterStore>::AggregatedKeyValue as AggregatedKeyValue>::Key,
>,
<<Self as RuntimeParameterStore>::AggregratedKeyValue as AggregratedKeyValue>::Value:
TryIntoKey<<KV as AggregratedKeyValue>::Value>,
<KV as AggregratedKeyValue>::Value: TryInto<K::WrappedValue>,
<<Self as RuntimeParameterStore>::AggregatedKeyValue as AggregatedKeyValue>::Value:
TryIntoKey<<KV as AggregatedKeyValue>::Value>,
<KV as AggregatedKeyValue>::Value: TryInto<K::WrappedValue>,
{
let key: <KV as AggregratedKeyValue>::Key = key.into();
let key: <KV as AggregatedKeyValue>::Key = key.into();
let val = Parameters::<T>::get(key.into_key());
val.and_then(|v| {
let val: <KV as AggregratedKeyValue>::Value = v.try_into_key().ok()?;
let val: <KV as AggregatedKeyValue>::Value = v.try_into_key().ok()?;
let val: K::WrappedValue = val.try_into().ok()?;
let val = val.into();
Some(val)
+1 -1
View File
@@ -25,7 +25,7 @@ use crate::tests::mock::{
RuntimeParametersValue,
};
use codec::Encode;
use frame_support::{assert_noop, assert_ok, traits::dynamic_params::AggregratedKeyValue};
use frame_support::{assert_noop, assert_ok, traits::dynamic_params::AggregatedKeyValue};
use sp_core::Get;
use sp_runtime::DispatchError;