pub struct HeaderProcessingContext {
pub hash: Hash,
pub header: Arc<Header>,
pub pruning_info: PruningPointInfo,
pub block_level: BlockLevel,
pub known_parents: Vec<BlockHashes>,
pub ghostdag_data: Option<Vec<Arc<GhostdagData>>>,
pub block_window_for_difficulty: Option<Arc<BlockWindowHeap>>,
pub block_window_for_past_median_time: Option<Arc<BlockWindowHeap>>,
pub mergeset_non_daa: Option<BlockHashSet>,
pub merge_depth_root: Option<Hash>,
pub finality_point: Option<Hash>,
}Fields§
§hash: Hash§header: Arc<Header>§pruning_info: PruningPointInfo§block_level: BlockLevel§known_parents: Vec<BlockHashes>§ghostdag_data: Option<Vec<Arc<GhostdagData>>>§block_window_for_difficulty: Option<Arc<BlockWindowHeap>>§block_window_for_past_median_time: Option<Arc<BlockWindowHeap>>§mergeset_non_daa: Option<BlockHashSet>§merge_depth_root: Option<Hash>§finality_point: Option<Hash>Implementations§
Source§impl HeaderProcessingContext
impl HeaderProcessingContext
pub fn new( hash: Hash, header: Arc<Header>, block_level: BlockLevel, pruning_info: PruningPointInfo, known_parents: Vec<BlockHashes>, ) -> Self
Sourcepub fn direct_known_parents(&self) -> &[Hash]
pub fn direct_known_parents(&self) -> &[Hash]
Returns the direct parents of this header after removal of unknown parents
Sourcepub fn pruning_point(&self) -> Hash
pub fn pruning_point(&self) -> Hash
Returns the pruning point at the time this header began processing
Sourcepub fn ghostdag_data(&self) -> &Arc<GhostdagData>
pub fn ghostdag_data(&self) -> &Arc<GhostdagData>
Returns the primary (level 0) GHOSTDAG data of this header. NOTE: is expected to be called only after GHOSTDAG computation was pushed into the context
Auto Trait Implementations§
impl Freeze for HeaderProcessingContext
impl RefUnwindSafe for HeaderProcessingContext
impl Send for HeaderProcessingContext
impl Sync for HeaderProcessingContext
impl Unpin for HeaderProcessingContext
impl UnwindSafe for HeaderProcessingContext
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
Mutably borrows from an owned value. Read more
Source§impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.Source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
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