mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
WIP: CI: add spellcheck (#3421)
* CI: add spellcheck * revert me * CI: explicit command for spellchecker * spellcheck: edit misspells * CI: run spellcheck on diff * spellcheck: edits * spellcheck: edit misspells * spellcheck: add rules * spellcheck: mv configs * spellcheck: more edits * spellcheck: chore * spellcheck: one more thing * spellcheck: and another one * spellcheck: seems like it doesn't get to an end * spellcheck: new words after rebase * spellcheck: new words appearing out of nowhere * chore * review edits * more review edits * more edits * wonky behavior * wonky behavior 2 * wonky behavior 3 * change git behavior * spellcheck: another bunch of new edits * spellcheck: new words are koming out of nowhere * CI: finding the master * CI: fetching master implicitly * CI: undebug * new errors * a bunch of new edits * and some more * Update node/core/approval-voting/src/approval_db/v1/mod.rs Co-authored-by: Andronik Ordian <write@reusable.software> * Update xcm/xcm-executor/src/assets.rs Co-authored-by: Andronik Ordian <write@reusable.software> * Apply suggestions from code review Co-authored-by: Andronik Ordian <write@reusable.software> * Suggestions from the code review * CI: scan only changed files Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
@@ -32,7 +32,7 @@ choosen
|
||||
config/MS
|
||||
crypto/MS
|
||||
customizable/B
|
||||
debian/M
|
||||
Debian/M
|
||||
decodable/MS
|
||||
DOT/S
|
||||
doesn
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for {{pallet}}
|
||||
//! Autogenerated weights for {{cmd.pallet}}
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
|
||||
//! DATE: {{date}}, STEPS: {{cmd.steps}}, REPEAT: {{cmd.repeat}}
|
||||
|
||||
@@ -199,7 +199,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = bp_millau::BlockLength;
|
||||
/// The weight of database operations that the runtime can invoke.
|
||||
type DbWeight = DbWeight;
|
||||
/// The designated SS58 prefix of this chain.
|
||||
/// The designated `SS58` prefix of this chain.
|
||||
type SS58Prefix = SS58Prefix;
|
||||
/// The set code logic, just the default since we're not a parachain.
|
||||
type OnSetCode = ();
|
||||
@@ -239,7 +239,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_timestamp::Config for Runtime {
|
||||
/// A timestamp: milliseconds since the unix epoch.
|
||||
/// A timestamp: milliseconds since the Unix epoch.
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = Aura;
|
||||
type MinimumPeriod = MinimumPeriod;
|
||||
@@ -421,9 +421,9 @@ pub type Header = generic::Header<BlockNumber, Hashing>;
|
||||
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
/// A Block signed with a Justification
|
||||
pub type SignedBlock = generic::SignedBlock<Block>;
|
||||
/// BlockId type as expected by this runtime.
|
||||
/// `BlockId` type as expected by this runtime.
|
||||
pub type BlockId = generic::BlockId<Block>;
|
||||
/// The SignedExtension to the basic transaction logic.
|
||||
/// The `SignedExtension` to the basic transaction logic.
|
||||
pub type SignedExtra = (
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
|
||||
@@ -55,8 +55,8 @@ pub struct EthereumTransactionInclusionProof {
|
||||
///
|
||||
/// The assumption is that this pair will never appear more than once in
|
||||
/// transactions included into finalized blocks. This is obviously true
|
||||
/// for any existing eth-like chain (that keep current tx format), because
|
||||
/// otherwise transaction can be replayed over and over.
|
||||
/// for any existing eth-like chain (that keep current transaction format),
|
||||
/// because otherwise transaction can be replayed over and over.
|
||||
#[derive(Encode, Decode, PartialEq, RuntimeDebug)]
|
||||
pub struct EthereumTransactionTag {
|
||||
/// Account that has locked funds.
|
||||
|
||||
@@ -34,8 +34,8 @@ frame_support::parameter_types! {
|
||||
kovan_validators_configuration();
|
||||
}
|
||||
|
||||
/// Max number of finalized headers to keep. It is equivalent of ~24 hours of
|
||||
/// finalized blocks on current Kovan chain.
|
||||
/// Max number of finalized headers to keep. It is equivalent of approximately
|
||||
/// 24 hours of finalized blocks on current Kovan chain.
|
||||
const FINALIZED_HEADERS_TO_KEEP: u64 = 20_000;
|
||||
|
||||
/// Aura engine configuration for Kovan chain.
|
||||
|
||||
@@ -206,7 +206,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = bp_rialto::BlockLength;
|
||||
/// The weight of database operations that the runtime can invoke.
|
||||
type DbWeight = DbWeight;
|
||||
/// The designated SS58 prefix of this chain.
|
||||
/// The designated `SS58` prefix of this chain.
|
||||
type SS58Prefix = SS58Prefix;
|
||||
/// The set code logic, just the default since we're not a parachain.
|
||||
type OnSetCode = ();
|
||||
@@ -346,7 +346,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_timestamp::Config for Runtime {
|
||||
/// A timestamp: milliseconds since the unix epoch.
|
||||
/// A timestamp: milliseconds since the Unix epoch.
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = Aura;
|
||||
type MinimumPeriod = MinimumPeriod;
|
||||
@@ -531,9 +531,9 @@ pub type Header = generic::Header<BlockNumber, Hashing>;
|
||||
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
/// A Block signed with a Justification
|
||||
pub type SignedBlock = generic::SignedBlock<Block>;
|
||||
/// BlockId type as expected by this runtime.
|
||||
/// `BlockId` type as expected by this runtime.
|
||||
pub type BlockId = generic::BlockId<Block>;
|
||||
/// The SignedExtension to the basic transaction logic.
|
||||
/// The `SignedExtension` to the basic transaction logic.
|
||||
pub type SignedExtra = (
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
@@ -1060,7 +1060,7 @@ impl_runtime_apis! {
|
||||
/// Millau account ownership digest from Rialto.
|
||||
///
|
||||
/// The byte vector returned by this function should be signed with a Millau account private key.
|
||||
/// This way, the owner of `rialto_account_id` on Rialto proves that the 'millau' account private key
|
||||
/// This way, the owner of `rialto_account_id` on Rialto proves that the Millau account private key
|
||||
/// is also under his control.
|
||||
pub fn rialto_to_millau_account_ownership_digest<Call, AccountId, SpecVersion>(
|
||||
millau_call: &Call,
|
||||
|
||||
@@ -110,7 +110,7 @@ impl TPruningStrategy for PruningStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
/// ChainTime provider
|
||||
/// `ChainTime` provider
|
||||
#[derive(Default)]
|
||||
pub struct ChainTime;
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ pub struct ProofParams<Recipient> {
|
||||
/// When true, recipient must exists before import.
|
||||
pub recipient_exists: bool,
|
||||
/// When 0, transaction should have minimal possible size. When this value has non-zero value n,
|
||||
/// transaction size should be (if possible) near to MIN_SIZE + n * SIZE_FACTOR.
|
||||
/// transaction size should be (if possible) near to `MIN_SIZE + n * SIZE_FACTOR`.
|
||||
pub transaction_size_factor: u32,
|
||||
/// When 0, proof should have minimal possible size. When this value has non-zero value n,
|
||||
/// proof size should be (if possible) near to MIN_SIZE + n * SIZE_FACTOR.
|
||||
/// proof size should be (if possible) near to `MIN_SIZE + n * SIZE_FACTOR`.
|
||||
pub proof_size_factor: u32,
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
//! The messages are interpreted directly as runtime `Call`. We attempt to decode
|
||||
//! them and then dispatch as usual. To prevent compatibility issues, the Calls have
|
||||
//! to include a `spec_version`. This will be checked before dispatch. In the case of
|
||||
//! a succesful dispatch an event is emitted.
|
||||
//! a successful dispatch an event is emitted.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![warn(missing_docs)]
|
||||
@@ -52,7 +52,7 @@ pub trait Config<I = DefaultInstance>: frame_system::Config {
|
||||
/// The overarching event type.
|
||||
type Event: From<Event<Self, I>> + Into<<Self as frame_system::Config>::Event>;
|
||||
/// Id of the message. Whenever message is passed to the dispatch module, it emits
|
||||
/// event with this id + dispatch result. Could be e.g. (LaneId, MessageNonce) if
|
||||
/// event with this id + dispatch result. Could be e.g. (`LaneId`, `MessageNonce`) if
|
||||
/// it comes from the messages module.
|
||||
type MessageId: Parameter;
|
||||
/// Type of account ID on source chain.
|
||||
@@ -77,13 +77,13 @@ pub trait Config<I = DefaultInstance>: frame_system::Config {
|
||||
/// The type that is used to wrap the `Self::Call` when it is moved over bridge.
|
||||
///
|
||||
/// The idea behind this is to avoid `Call` conversion/decoding until we'll be sure
|
||||
/// that all other stuff (like `spec_version`) is ok. If we would try to decode
|
||||
/// that all other stuff (like `spec_version`) is OK. If we would try to decode
|
||||
/// `Call` which has been encoded using previous `spec_version`, then we might end
|
||||
/// up with decoding error, instead of `MessageVersionSpecMismatch`.
|
||||
type EncodedCall: Decode + Encode + Into<Result<<Self as Config<I>>::Call, ()>>;
|
||||
/// A type which can be turned into an AccountId from a 256-bit hash.
|
||||
/// A type which can be turned into an `AccountId` from a 256-bit hash.
|
||||
///
|
||||
/// Used when deriving target chain AccountIds from source chain AccountIds.
|
||||
/// Used when deriving target chain `AccountId`s from source chain `AccountId`s.
|
||||
type AccountIdConverter: sp_runtime::traits::Convert<sp_core::hash::H256, Self::AccountId>;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Pallet for checking GRANDPA Finality Proofs.
|
||||
//!
|
||||
//! Adapted copy of substrate/client/finality-grandpa/src/justification.rs. If origin
|
||||
//! Adapted copy of `substrate/client/finality-grandpa/src/justification.rs`. If origin
|
||||
//! will ever be moved to the sp_finality_grandpa, we should reuse that implementation.
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
@@ -57,7 +57,7 @@ pub enum Error {
|
||||
InvalidJustificationTarget,
|
||||
/// The authority has provided an invalid signature.
|
||||
InvalidAuthoritySignature,
|
||||
/// The justification contains precommit for header that is not a descendant of the commit header.
|
||||
/// The justification contains pre-commit for header that is not a descendant of the commit header.
|
||||
PrecommitIsNotCommitDescendant,
|
||||
/// The cumulative weight of all votes in the justification is not enough to justify commit
|
||||
/// header finalization.
|
||||
@@ -119,7 +119,7 @@ where
|
||||
if signed.precommit.target_number < justification.commit.target_number {
|
||||
return Err(Error::PrecommitIsNotCommitDescendant);
|
||||
}
|
||||
// all precommits must be for target block descendents
|
||||
// all precommits must be for target block descendants
|
||||
chain = chain.ensure_descendant(&justification.commit.target_hash, &signed.precommit.target_hash)?;
|
||||
// since we know now that the precommit target is the descendant of the justification target,
|
||||
// we may increase 'weight' of the justification target
|
||||
@@ -154,7 +154,7 @@ where
|
||||
}
|
||||
|
||||
// check that the cumulative weight of validators voted for the justification target (or one
|
||||
// of its descendents) is larger than required threshold.
|
||||
// of its descendants) is larger than required threshold.
|
||||
let threshold = authorities_set.threshold().0.into();
|
||||
if cumulative_weight >= threshold {
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user