mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 15:21:05 +00:00
thiserror annotations + spelling (#3452)
* remove duplicate thiserror annotations * chore: cargo spellcheck
This commit is contained in:
committed by
GitHub
parent
b5257b2407
commit
d76560fea2
@@ -65,7 +65,7 @@ pub enum Fatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::Fatal),
|
||||
Runtime(#[from] runtime::Fatal),
|
||||
}
|
||||
|
||||
/// Non-fatal errors of this subsystem.
|
||||
@@ -104,7 +104,7 @@ pub enum NonFatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::NonFatal),
|
||||
Runtime(#[from] runtime::NonFatal),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
@@ -63,7 +63,7 @@ pub enum Fatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::Fatal),
|
||||
Runtime(#[from] runtime::Fatal),
|
||||
}
|
||||
|
||||
/// Errors for fetching of runtime information.
|
||||
@@ -75,7 +75,7 @@ pub enum NonFatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::NonFatal),
|
||||
Runtime(#[from] runtime::NonFatal),
|
||||
}
|
||||
|
||||
/// Utility for eating top level errors and log them.
|
||||
|
||||
@@ -68,11 +68,11 @@ pub enum Fatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::Fatal),
|
||||
Runtime(#[from] runtime::Fatal),
|
||||
|
||||
/// Errors coming from DisputeSender
|
||||
#[error("Error while accessing runtime information")]
|
||||
Sender(#[from] #[source] sender::Fatal),
|
||||
Sender(#[from] sender::Fatal),
|
||||
}
|
||||
|
||||
/// Non-fatal errors of this subsystem.
|
||||
@@ -80,7 +80,7 @@ pub enum Fatal {
|
||||
pub enum NonFatal {
|
||||
/// Errors coming from DisputeSender
|
||||
#[error("Error while accessing runtime information")]
|
||||
Sender(#[from] #[source] sender::NonFatal),
|
||||
Sender(#[from] sender::NonFatal),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
@@ -40,7 +40,7 @@ struct MetricsInner {
|
||||
|
||||
/// Number of requests for which `ImportStatements` returned.
|
||||
///
|
||||
/// We both have success full imports and failed imports here.
|
||||
/// We both have successful imports and failed imports here.
|
||||
imported_requests: CounterVec<U64>,
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ pub enum Fatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::Fatal),
|
||||
Runtime(#[from] runtime::Fatal),
|
||||
}
|
||||
|
||||
/// Non-fatal errors of this subsystem.
|
||||
@@ -88,7 +88,7 @@ pub enum NonFatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::NonFatal),
|
||||
Runtime(#[from] runtime::NonFatal),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
@@ -56,7 +56,7 @@ pub enum Fatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::Fatal),
|
||||
Runtime(#[from] runtime::Fatal),
|
||||
}
|
||||
|
||||
/// Non-fatal errors of this subsystem.
|
||||
@@ -100,7 +100,7 @@ pub enum NonFatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::NonFatal),
|
||||
Runtime(#[from] runtime::NonFatal),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
@@ -46,7 +46,7 @@ use self::error::NonFatalResult;
|
||||
|
||||
/// The `DisputeSender` keeps track of all ongoing disputes we need to send statements out.
|
||||
///
|
||||
/// For each dispute a `SendTask` is responsible of sending to the concerned validators for that
|
||||
/// For each dispute a `SendTask` is responsible for sending to the concerned validators for that
|
||||
/// particular dispute. The `DisputeSender` keeps track of those tasks, informs them about new
|
||||
/// sessions/validator sets and cleans them up when they become obsolete.
|
||||
pub struct DisputeSender {
|
||||
@@ -318,7 +318,7 @@ impl DisputeSender
|
||||
|
||||
/// Retrieve the currently active sessions.
|
||||
///
|
||||
/// List is all indeces of all active sessions together with the head that was used for the query.
|
||||
/// List is all indices of all active sessions together with the head that was used for the query.
|
||||
async fn get_active_session_indeces<Context: SubsystemContext>(
|
||||
ctx: &mut Context,
|
||||
runtime: &mut RuntimeInfo,
|
||||
|
||||
@@ -59,7 +59,7 @@ pub struct SendTask {
|
||||
/// dispute happened and the authorities of the current sessions as determined by active heads.
|
||||
deliveries: HashMap<AuthorityDiscoveryId, DeliveryStatus>,
|
||||
|
||||
/// Whether or not we have any tasks failed since the last refresh.
|
||||
/// Whether we have any tasks failed since the last refresh.
|
||||
has_failed_sends: bool,
|
||||
|
||||
/// Sender to be cloned for tasks.
|
||||
@@ -162,7 +162,7 @@ impl SendTask
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Whether or not any sends have failed since the last refreshed.
|
||||
/// Whether any sends have failed since the last refreshed.
|
||||
pub fn has_failed_sends(&self) -> bool {
|
||||
self.has_failed_sends
|
||||
}
|
||||
@@ -247,7 +247,7 @@ impl SendTask
|
||||
}
|
||||
|
||||
|
||||
/// Start sending of the given msg to all given authorities.
|
||||
/// Start sending of the given message to all given authorities.
|
||||
///
|
||||
/// And spawn tasks for handling the response.
|
||||
async fn send_requests<Context: SubsystemContext>(
|
||||
|
||||
@@ -77,7 +77,7 @@ pub enum Fatal {
|
||||
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::Fatal),
|
||||
Runtime(#[from] runtime::Fatal),
|
||||
}
|
||||
|
||||
/// Errors for fetching of runtime information.
|
||||
@@ -85,7 +85,7 @@ pub enum Fatal {
|
||||
pub enum NonFatal {
|
||||
/// Errors coming from runtime::Runtime.
|
||||
#[error("Error while accessing runtime information")]
|
||||
Runtime(#[from] #[source] runtime::NonFatal),
|
||||
Runtime(#[from] runtime::NonFatal),
|
||||
|
||||
/// Relay parent was not present in active heads.
|
||||
#[error("Relay parent could not be found in active heads")]
|
||||
|
||||
Reference in New Issue
Block a user