pub struct PruningPointManager<S: GhostdagStoreReader, T: ReachabilityStoreReader, U: HeaderStoreReader, V: PastPruningPointsStoreReader, W: HeadersSelectedTipStoreReader> { /* private fields */ }Implementations§
Source§impl<S: GhostdagStoreReader, T: ReachabilityStoreReader, U: HeaderStoreReader, V: PastPruningPointsStoreReader, W: HeadersSelectedTipStoreReader> PruningPointManager<S, T, U, V, W>
impl<S: GhostdagStoreReader, T: ReachabilityStoreReader, U: HeaderStoreReader, V: PastPruningPointsStoreReader, W: HeadersSelectedTipStoreReader> PruningPointManager<S, T, U, V, W>
pub fn new( pruning_depth: u64, finality_depth: u64, genesis_hash: Hash, reachability_service: MTReachabilityService<T>, ghostdag_store: Arc<S>, headers_store: Arc<U>, past_pruning_points_store: Arc<V>, header_selected_tip_store: Arc<RwLock<W>>, ) -> Self
pub fn next_pruning_points_and_candidate_by_ghostdag_data( &self, ghostdag_data: CompactGhostdagData, suggested_low_hash: Option<Hash>, current_candidate: Hash, current_pruning_point: Hash, ) -> (Vec<Hash>, Hash)
pub fn expected_header_pruning_point( &self, ghostdag_data: CompactGhostdagData, pruning_info: PruningPointInfo, ) -> Hash
pub fn is_valid_pruning_point(&self, pp_candidate: Hash, hst: Hash) -> bool
pub fn are_pruning_points_in_valid_chain( &self, pruning_info: PruningPointInfo, hst: Hash, ) -> bool
Trait Implementations§
Source§impl<S: Clone + GhostdagStoreReader, T: Clone + ReachabilityStoreReader, U: Clone + HeaderStoreReader, V: Clone + PastPruningPointsStoreReader, W: Clone + HeadersSelectedTipStoreReader> Clone for PruningPointManager<S, T, U, V, W>
impl<S: Clone + GhostdagStoreReader, T: Clone + ReachabilityStoreReader, U: Clone + HeaderStoreReader, V: Clone + PastPruningPointsStoreReader, W: Clone + HeadersSelectedTipStoreReader> Clone for PruningPointManager<S, T, U, V, W>
Source§fn clone(&self) -> PruningPointManager<S, T, U, V, W>
fn clone(&self) -> PruningPointManager<S, T, U, V, W>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<S, T, U, V, W> Freeze for PruningPointManager<S, T, U, V, W>
impl<S, T, U, V, W> !RefUnwindSafe for PruningPointManager<S, T, U, V, W>
impl<S, T, U, V, W> Send for PruningPointManager<S, T, U, V, W>
impl<S, T, U, V, W> Sync for PruningPointManager<S, T, U, V, W>
impl<S, T, U, V, W> Unpin for PruningPointManager<S, T, U, V, W>
impl<S, T, U, V, W> !UnwindSafe for PruningPointManager<S, T, U, V, W>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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