pub enum WorkPackageStatus {
Reportable {
remaining_blocks: u16,
},
Reported {
reported_in: BlockDesc,
core: CoreIndex,
report_hash: WorkReportHash,
},
Ready {
reported_in: BlockDesc,
core: CoreIndex,
report_hash: WorkReportHash,
ready_in: BlockDesc,
},
Failed(Cow<'static, str>),
}Expand description
Status of a work-package following execution of a block.
Note that the status of a work-package may be different on different forks. As
Node::subscribe_work_package_status(finalized: false) follows the best block, it can jump
between forks, and thus potentially yield “impossible” status transitions.
Variants§
Reportable
The work-package has not yet been reported, but could be reported in a descendant block.
Fields
Reported
The work-package has been reported but is not yet available.
Fields
report_hash: WorkReportHashThe hash of the work-report that was included on-chain.
Ready
The work-package is ready, ie it is either available or has been audited.
A ready work-package is queued for accumulation once its prerequisites are met.
Accumulation of a ready work-package is not guaranteed, in particular its prerequisites may
never be met. Note that there is no “accumulated” status to indicate when accumulation has
happened. To determine if/when a work-package is accumulated, you should monitor the
service’s state for the expected changes using eg Node::subscribe_service_value.
Fields
report_hash: WorkReportHashThe hash of the work-report that was included on-chain.
Failed(Cow<'static, str>)
The work-package cannot become ready on this fork.
This could be because:
- Its anchor is on a different fork.
- It was not reported in time.
- It did not become available in time.
The Cow is a freeform message giving details.
Trait Implementations§
Source§impl Clone for WorkPackageStatus
impl Clone for WorkPackageStatus
Source§fn clone(&self) -> WorkPackageStatus
fn clone(&self) -> WorkPackageStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkPackageStatus
impl Debug for WorkPackageStatus
Source§impl<'de> Deserialize<'de> for WorkPackageStatus
impl<'de> Deserialize<'de> for WorkPackageStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for WorkPackageStatus
impl PartialEq for WorkPackageStatus
Source§impl Serialize for WorkPackageStatus
impl Serialize for WorkPackageStatus
impl Eq for WorkPackageStatus
impl StructuralPartialEq for WorkPackageStatus
Auto Trait Implementations§
impl Freeze for WorkPackageStatus
impl RefUnwindSafe for WorkPackageStatus
impl Send for WorkPackageStatus
impl Sync for WorkPackageStatus
impl Unpin for WorkPackageStatus
impl UnwindSafe for WorkPackageStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more