mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
cargo spellcheck (#3067)
This commit is contained in:
committed by
GitHub
parent
9b06a38bb6
commit
e8652e73db
@@ -68,7 +68,7 @@ pub enum Fatal {
|
||||
Runtime(#[from] #[source] runtime::Fatal),
|
||||
}
|
||||
|
||||
/// Non fatal errors of this subsystem.
|
||||
/// Non-fatal errors of this subsystem.
|
||||
#[derive(Debug, Error)]
|
||||
pub enum NonFatal {
|
||||
/// av-store will drop the sender on any error that happens.
|
||||
|
||||
@@ -221,13 +221,13 @@ impl FetchTask {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether or not there are still relay parents around with this candidate pending
|
||||
/// Whether there are still relay parents around with this candidate pending
|
||||
/// availability.
|
||||
pub fn is_live(&self) -> bool {
|
||||
!self.live_in.is_empty()
|
||||
}
|
||||
|
||||
/// Whether or not this task can be considered finished.
|
||||
/// Whether this task can be considered finished.
|
||||
///
|
||||
/// That is, it is either canceled, succeeded or failed.
|
||||
pub fn is_finished(&self) -> bool {
|
||||
|
||||
@@ -91,7 +91,7 @@ impl Requester {
|
||||
}
|
||||
/// Update heads that need availability distribution.
|
||||
///
|
||||
/// For all active heads we will be fetching our chunks for availabilty distribution.
|
||||
/// For all active heads we will be fetching our chunks for availability distribution.
|
||||
#[tracing::instrument(level = "trace", skip(self, ctx, runtime, update), fields(subsystem = LOG_TARGET))]
|
||||
pub async fn update_fetching_heads<Context>(
|
||||
&mut self,
|
||||
|
||||
@@ -68,7 +68,7 @@ pub struct TestState {
|
||||
pub relay_chain: Vec<Hash>,
|
||||
/// Whenever the subsystem tries to fetch an erasure chunk one item of the given vec will be
|
||||
/// popped. So you can experiment with serving invalid chunks or no chunks on request and see
|
||||
/// whether the subystem still succeds with its goal.
|
||||
/// whether the subsystem still succeeds with its goal.
|
||||
pub chunks: HashMap<(CandidateHash, ValidatorIndex), Vec<Option<ErasureChunk>>>,
|
||||
/// All chunks that are valid and should be accepted.
|
||||
pub valid_chunks: HashSet<(CandidateHash, ValidatorIndex)>,
|
||||
|
||||
@@ -233,7 +233,7 @@ impl BitfieldDistribution {
|
||||
}
|
||||
}
|
||||
|
||||
/// Modify the reputation of a peer based on its behaviour.
|
||||
/// Modify the reputation of a peer based on its behavior.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn modify_reputation<Context>(
|
||||
ctx: &mut Context,
|
||||
@@ -560,7 +560,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle the changes necassary when our view changes.
|
||||
/// Handle the changes necessary when our view changes.
|
||||
#[tracing::instrument(level = "trace", fields(subsystem = LOG_TARGET))]
|
||||
fn handle_our_view_change(state: &mut ProtocolState, view: OurView) {
|
||||
let old_view = std::mem::replace(&mut (state.view), view);
|
||||
|
||||
@@ -317,7 +317,7 @@ impl<Net, AD, Context> Subsystem<Context> for NetworkBridge<Net, AD>
|
||||
}
|
||||
|
||||
struct PeerData {
|
||||
/// Latest view sent by the peer.
|
||||
/// The Latest view sent by the peer.
|
||||
view: View,
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ where
|
||||
|
||||
/// An action to be carried out by the network.
|
||||
///
|
||||
/// This type is used for implementing `Sink` in order to cummunicate asynchronously with the
|
||||
/// This type is used for implementing `Sink` in order to communicate asynchronously with the
|
||||
/// underlying network implementation in the `Network` trait.
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum NetworkAction {
|
||||
|
||||
@@ -1048,7 +1048,7 @@ mod tests {
|
||||
|
||||
/// Generate a new relay parent and inform the subsystem about the new view.
|
||||
///
|
||||
/// If `merge_views == true` it means the subsystem will be informed that we working on the old `relay_parent`
|
||||
/// If `merge_views == true` it means the subsystem will be informed that we are working on the old `relay_parent`
|
||||
/// and the new one.
|
||||
async fn advance_to_new_round(&mut self, virtual_overseer: &mut VirtualOverseer, merge_views: bool) {
|
||||
let old_relay_parent = self.relay_parent;
|
||||
@@ -1339,7 +1339,7 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
/// Check that the next received message is a collation advertisment message.
|
||||
/// Check that the next received message is a collation advertisement message.
|
||||
async fn expect_advertise_collation_msg(
|
||||
virtual_overseer: &mut VirtualOverseer,
|
||||
peer: &PeerId,
|
||||
|
||||
@@ -324,14 +324,14 @@ pub mod v1 {
|
||||
LargeStatement(StatementMetadata),
|
||||
}
|
||||
|
||||
/// Data that maes a statement unique.
|
||||
/// Data that makes a statement unique.
|
||||
#[derive(Debug, Clone, Encode, Decode, PartialEq, Eq, Hash)]
|
||||
pub struct StatementMetadata {
|
||||
/// Relayt parent this statement is relevant under.
|
||||
/// Relay parent this statement is relevant under.
|
||||
pub relay_parent: Hash,
|
||||
/// Hash of the candidate that got validated.
|
||||
pub candidate_hash: CandidateHash,
|
||||
/// Validator that attested the valididty.
|
||||
/// Validator that attested the validity.
|
||||
pub signed_by: ValidatorIndex,
|
||||
/// Signature of seconding validator.
|
||||
pub signature: ValidatorSignature,
|
||||
@@ -369,7 +369,7 @@ pub mod v1 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether or not this message contains a large statement.
|
||||
/// Whether this message contains a large statement.
|
||||
pub fn is_large_statement(&self) -> bool {
|
||||
if let Self::LargeStatement(_) = self {
|
||||
true
|
||||
|
||||
@@ -30,7 +30,7 @@ pub enum PeerSet {
|
||||
Collation,
|
||||
}
|
||||
|
||||
/// Whether or not a node is an authority or not.
|
||||
/// Whether a node is an authority or not.
|
||||
///
|
||||
/// Peer set configuration gets adjusted accordingly.
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
|
||||
@@ -104,7 +104,7 @@ pub enum Recipient {
|
||||
/// discovery system.
|
||||
#[derive(Debug)]
|
||||
pub struct OutgoingRequest<Req> {
|
||||
/// Intendent recipient of this request.
|
||||
/// Intended recipient of this request.
|
||||
pub peer: Recipient,
|
||||
/// The actual request to send over the wire.
|
||||
pub payload: Req,
|
||||
|
||||
@@ -28,7 +28,7 @@ use crate::LOG_TARGET;
|
||||
|
||||
/// General result.
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
/// Result for non fatal only failures.
|
||||
/// Result for non-fatal only failures.
|
||||
pub type NonFatalResult<T> = std::result::Result<T, NonFatal>;
|
||||
/// Result for fatal only failures.
|
||||
pub type FatalResult<T> = std::result::Result<T, Fatal>;
|
||||
|
||||
@@ -39,7 +39,7 @@ const RETRY_TIMEOUT: Duration = Duration::from_millis(500);
|
||||
|
||||
/// Messages coming from a background task.
|
||||
pub enum RequesterMessage {
|
||||
/// Get an update of availble peers to try for fetching a given statement.
|
||||
/// Get an update of available peers to try for fetching a given statement.
|
||||
GetMorePeers {
|
||||
relay_parent: Hash,
|
||||
candidate_hash: CandidateHash,
|
||||
@@ -69,7 +69,7 @@ pub enum RequesterMessage {
|
||||
/// A fetching task, taking care of fetching large statements via request/response.
|
||||
///
|
||||
/// A fetch task does not know about a particular `Statement` instead it just tries fetching a
|
||||
/// `CommittedCandidateReceipt` from peers, whether or not this can be used to re-assemble one ore
|
||||
/// `CommittedCandidateReceipt` from peers, whether this can be used to re-assemble one ore
|
||||
/// many `SignedFullStatement`s needs to be verified by the caller.
|
||||
pub async fn fetch(
|
||||
relay_parent: Hash,
|
||||
|
||||
@@ -35,7 +35,7 @@ const COST_INVALID_REQUEST: Rep = Rep::CostMajor("Peer sent unparsable request")
|
||||
|
||||
/// Messages coming from a background task.
|
||||
pub enum ResponderMessage {
|
||||
/// Get an update of availble peers to try for fetching a given statement.
|
||||
/// Get an update of available peers to try for fetching a given statement.
|
||||
GetData {
|
||||
requesting_peer: PeerId,
|
||||
relay_parent: Hash,
|
||||
@@ -48,7 +48,7 @@ pub enum ResponderMessage {
|
||||
/// A fetching task, taking care of fetching large statements via request/response.
|
||||
///
|
||||
/// A fetch task does not know about a particular `Statement` instead it just tries fetching a
|
||||
/// `CommittedCandidateReceipt` from peers, whether or not this can be used to re-assemble one ore
|
||||
/// `CommittedCandidateReceipt` from peers, whether this can be used to re-assemble one ore
|
||||
/// many `SignedFullStatement`s needs to be verified by the caller.
|
||||
pub async fn respond(
|
||||
mut receiver: mpsc::Receiver<sc_network::config::IncomingRequest>,
|
||||
|
||||
Reference in New Issue
Block a user