mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-23 16:35:46 +00:00
availability-recovery: move cpu burners in blocking tasks (#7417)
* Move expensive computations to blocking thread Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix test Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * add internal error and fix dependent subystems Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix test fix Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * minor refactor and TODOs Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Impl Feedback for Review Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * review feedback Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * More docs Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * add some example timings in comments Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> --------- Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
@@ -75,6 +75,9 @@ pub enum RecoveryError {
|
||||
|
||||
/// A requested chunk is unavailable.
|
||||
Unavailable,
|
||||
|
||||
/// Erasure task channel closed, usually means node is shutting down.
|
||||
ChannelClosed,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for RecoveryError {
|
||||
@@ -82,6 +85,7 @@ impl std::fmt::Display for RecoveryError {
|
||||
let msg = match self {
|
||||
RecoveryError::Invalid => "Invalid",
|
||||
RecoveryError::Unavailable => "Unavailable",
|
||||
RecoveryError::ChannelClosed => "ChannelClosed",
|
||||
};
|
||||
|
||||
write!(f, "{}", msg)
|
||||
|
||||
Reference in New Issue
Block a user