pub struct SubspaceLink<Block: BlockT> { /* private fields */ }
Expand description
State that must be shared between various consensus components.
Implementations§
source§impl<Block: BlockT> SubspaceLink<Block>
impl<Block: BlockT> SubspaceLink<Block>
sourcepub fn new(
chain_constants: ChainConstants,
kzg: Kzg,
erasure_coding: ErasureCoding,
) -> Self
pub fn new( chain_constants: ChainConstants, kzg: Kzg, erasure_coding: ErasureCoding, ) -> Self
Create new instance.
sourcepub fn new_slot_notification_stream(
&self,
) -> SubspaceNotificationStream<NewSlotNotification>
pub fn new_slot_notification_stream( &self, ) -> SubspaceNotificationStream<NewSlotNotification>
Get stream with notifications about new slot arrival with ability to send solution back.
sourcepub fn reward_signing_notification_stream(
&self,
) -> SubspaceNotificationStream<RewardSigningNotification>
pub fn reward_signing_notification_stream( &self, ) -> SubspaceNotificationStream<RewardSigningNotification>
A stream with notifications about headers that need to be signed with ability to send signature back.
sourcepub fn object_mapping_notification_stream(
&self,
) -> SubspaceNotificationStream<ObjectMappingNotification>
pub fn object_mapping_notification_stream( &self, ) -> SubspaceNotificationStream<ObjectMappingNotification>
Get stream with notifications about object mappings
sourcepub fn archived_segment_notification_stream(
&self,
) -> SubspaceNotificationStream<ArchivedSegmentNotification>
pub fn archived_segment_notification_stream( &self, ) -> SubspaceNotificationStream<ArchivedSegmentNotification>
Get stream with notifications about archived segment creation
sourcepub fn block_importing_notification_stream(
&self,
) -> SubspaceNotificationStream<BlockImportingNotification<Block>>
pub fn block_importing_notification_stream( &self, ) -> SubspaceNotificationStream<BlockImportingNotification<Block>>
Get stream with notifications about each imported block right BEFORE import actually happens.
NOTE: all Subspace checks have already happened for this block, but block can still potentially fail to import in Substrate’s internals.
sourcepub fn chain_constants(&self) -> &ChainConstants
pub fn chain_constants(&self) -> &ChainConstants
Subspace chain constants.
sourcepub fn erasure_coding(&self) -> &ErasureCoding
pub fn erasure_coding(&self) -> &ErasureCoding
Access erasure coding instance
Trait Implementations§
source§impl<Block: Clone + BlockT> Clone for SubspaceLink<Block>
impl<Block: Clone + BlockT> Clone for SubspaceLink<Block>
source§fn clone(&self) -> SubspaceLink<Block>
fn clone(&self) -> SubspaceLink<Block>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<Block> Freeze for SubspaceLink<Block>
impl<Block> !RefUnwindSafe for SubspaceLink<Block>
impl<Block> Send for SubspaceLink<Block>
impl<Block> Sync for SubspaceLink<Block>
impl<Block> Unpin for SubspaceLink<Block>
impl<Block> !UnwindSafe for SubspaceLink<Block>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.