mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +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:
@@ -284,7 +284,7 @@ impl View {
|
||||
|
||||
/// Check if two views have the same heads.
|
||||
///
|
||||
/// Equivalent to the `PartialEq` fn,
|
||||
/// Equivalent to the `PartialEq` function,
|
||||
/// but ignores the `finalized_number` field.
|
||||
pub fn check_heads_eq(&self, other: &Self) -> bool {
|
||||
self.heads == other.heads
|
||||
@@ -325,7 +325,7 @@ pub mod v1 {
|
||||
/// Seconded statement with large payload (e.g. containing a runtime upgrade).
|
||||
///
|
||||
/// We only gossip the hash in that case, actual payloads can be fetched from sending node
|
||||
/// via req/response.
|
||||
/// via request/response.
|
||||
#[codec(index = 1)]
|
||||
LargeStatement(StatementMetadata),
|
||||
}
|
||||
|
||||
@@ -16,18 +16,18 @@
|
||||
|
||||
//! Overview over request/responses as used in `Polkadot`.
|
||||
//!
|
||||
//! enum Protocol .... List of all supported protocols.
|
||||
//! `enum Protocol` .... List of all supported protocols.
|
||||
//!
|
||||
//! enum Requests .... List of all supported requests, each entry matches one in protocols, but
|
||||
//! `enum Requests` .... List of all supported requests, each entry matches one in protocols, but
|
||||
//! has the actual request as payload.
|
||||
//!
|
||||
//! struct IncomingRequest .... wrapper for incoming requests, containing a sender for sending
|
||||
//! `struct IncomingRequest` .... wrapper for incoming requests, containing a sender for sending
|
||||
//! responses.
|
||||
//!
|
||||
//! struct OutgoingRequest .... wrapper for outgoing requests, containing a sender used by the
|
||||
//! `struct OutgoingRequest` .... wrapper for outgoing requests, containing a sender used by the
|
||||
//! networking code for delivering responses/delivery errors.
|
||||
//!
|
||||
//! trait `IsRequest` .... A trait describing a particular request. It is used for gathering meta
|
||||
//! `trait IsRequest` .... A trait describing a particular request. It is used for gathering meta
|
||||
//! data, like what is the corresponding response type.
|
||||
//!
|
||||
//! Versioned (v1 module): The actual requests and responses as sent over the network.
|
||||
@@ -72,7 +72,7 @@ pub enum Protocol {
|
||||
|
||||
|
||||
/// Minimum bandwidth we expect for validators - 500Mbit/s is the recommendation, so approximately
|
||||
/// 50Meg bytes per second:
|
||||
/// 50MB per second:
|
||||
const MIN_BANDWIDTH_BYTES: u64 = 50 * 1024 * 1024;
|
||||
|
||||
/// Default request timeout in seconds.
|
||||
|
||||
@@ -79,7 +79,7 @@ impl Requests {
|
||||
///
|
||||
/// Note: `Requests` is just an enum collecting all supported requests supported by network
|
||||
/// bridge, it is never sent over the wire. This function just encodes the individual requests
|
||||
/// contained in the enum.
|
||||
/// contained in the `enum`.
|
||||
pub fn encode_request(self) -> (Protocol, OutgoingRequest<Vec<u8>>) {
|
||||
match self {
|
||||
Self::ChunkFetching(r) => r.encode_request(),
|
||||
@@ -219,7 +219,7 @@ impl From<oneshot::Canceled> for RequestError {
|
||||
/// `IncomingRequest`s are produced by `RequestMultiplexer` on behalf of the network bridge.
|
||||
#[derive(Debug)]
|
||||
pub struct IncomingRequest<Req> {
|
||||
/// PeerId of sending peer.
|
||||
/// `PeerId` of sending peer.
|
||||
pub peer: PeerId,
|
||||
/// The sent request.
|
||||
pub payload: Req,
|
||||
@@ -227,7 +227,7 @@ pub struct IncomingRequest<Req> {
|
||||
pub pending_response: OutgoingResponseSender<Req>,
|
||||
}
|
||||
|
||||
/// Sender for sendinb back responses on an `IncomingRequest`.
|
||||
/// Sender for sending back responses on an `IncomingRequest`.
|
||||
#[derive(Debug)]
|
||||
pub struct OutgoingResponseSender<Req>{
|
||||
pending_response: oneshot::Sender<netconfig::OutgoingResponse>,
|
||||
@@ -241,9 +241,9 @@ where
|
||||
{
|
||||
/// Send the response back.
|
||||
///
|
||||
/// On success we return Ok(()), on error we return the not sent `Response`.
|
||||
/// On success we return `Ok(())`, on error we return the not sent `Response`.
|
||||
///
|
||||
/// netconfig::OutgoingResponse exposes a way of modifying the peer's reputation. If needed we
|
||||
/// `netconfig::OutgoingResponse` exposes a way of modifying the peer's reputation. If needed we
|
||||
/// can change this function to expose this feature as well.
|
||||
pub fn send_response(self, resp: Req::Response) -> Result<(), Req::Response> {
|
||||
self.pending_response
|
||||
@@ -375,7 +375,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Future for actually receiving a typed response for an OutgoingRequest.
|
||||
/// Future for actually receiving a typed response for an `OutgoingRequest`.
|
||||
async fn receive_response<Req>(
|
||||
rec: oneshot::Receiver<Result<Vec<u8>, network::RequestFailure>>,
|
||||
) -> OutgoingResult<Req::Response>
|
||||
|
||||
@@ -172,7 +172,7 @@ impl IsRequest for AvailableDataFetchingRequest {
|
||||
pub struct StatementFetchingRequest {
|
||||
/// Data needed to locate and identify the needed statement.
|
||||
pub relay_parent: Hash,
|
||||
/// Hash of candidate that was used create the CommitedCandidateRecept.
|
||||
/// Hash of candidate that was used create the `CommitedCandidateRecept`.
|
||||
pub candidate_hash: CandidateHash,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user