pub struct SyncManager<S: RelationsStoreReader, T: ReachabilityStoreReader, U: GhostdagStoreReader, V: SelectedChainStoreReader, W: HeadersSelectedTipStoreReader, X: PruningStoreReader, Y: StatusesStoreReader> { /* private fields */ }Implementations§
Source§impl<S: RelationsStoreReader, T: ReachabilityStoreReader, U: GhostdagStoreReader, V: SelectedChainStoreReader, W: HeadersSelectedTipStoreReader, X: PruningStoreReader, Y: StatusesStoreReader> SyncManager<S, T, U, V, W, X, Y>
impl<S: RelationsStoreReader, T: ReachabilityStoreReader, U: GhostdagStoreReader, V: SelectedChainStoreReader, W: HeadersSelectedTipStoreReader, X: PruningStoreReader, Y: StatusesStoreReader> SyncManager<S, T, U, V, W, X, Y>
pub fn new( mergeset_size_limit: usize, reachability_service: MTReachabilityService<T>, traversal_manager: DagTraversalManager<U, T, S>, ghostdag_store: Arc<U>, selected_chain_store: Arc<RwLock<V>>, header_selected_tip_store: Arc<RwLock<W>>, pruning_point_store: Arc<RwLock<X>>, statuses_store: Arc<RwLock<Y>>, ) -> Self
Sourcepub fn antipast_hashes_between(
&self,
low: Hash,
high: Hash,
max_blocks: Option<usize>,
) -> (Vec<Hash>, Hash)
pub fn antipast_hashes_between( &self, low: Hash, high: Hash, max_blocks: Option<usize>, ) -> (Vec<Hash>, Hash)
Returns the hashes of the blocks between low’s antipast and high’s antipast, or up to max_blocks, if provided.
The result excludes low and includes high. If low == high, returns nothing. If max_blocks is some then it MUST be >= MergeSetSizeLimit
because it returns blocks with MergeSet granularity, so if MergeSet > max_blocks, the function will return nothing which is undesired behavior.
pub fn find_highest_common_chain_block(&self, low: Hash, high: Hash) -> Hash
Sourcepub fn create_virtual_selected_chain_block_locator(
&self,
low: Option<Hash>,
high: Option<Hash>,
) -> SyncManagerResult<Vec<Hash>>
pub fn create_virtual_selected_chain_block_locator( &self, low: Option<Hash>, high: Option<Hash>, ) -> SyncManagerResult<Vec<Hash>>
Returns a logarithmic amount of blocks sampled from the virtual selected chain between low and high.
Expects both blocks to be on the virtual selected chain, otherwise an error is returned
pub fn get_missing_block_body_hashes( &self, high: Hash, ) -> SyncManagerResult<Vec<Hash>>
pub fn create_block_locator_from_pruning_point( &self, high: Hash, low: Hash, limit: Option<usize>, ) -> SyncManagerResult<Vec<Hash>>
Trait Implementations§
Source§impl<S: Clone + RelationsStoreReader, T: Clone + ReachabilityStoreReader, U: Clone + GhostdagStoreReader, V: Clone + SelectedChainStoreReader, W: Clone + HeadersSelectedTipStoreReader, X: Clone + PruningStoreReader, Y: Clone + StatusesStoreReader> Clone for SyncManager<S, T, U, V, W, X, Y>
impl<S: Clone + RelationsStoreReader, T: Clone + ReachabilityStoreReader, U: Clone + GhostdagStoreReader, V: Clone + SelectedChainStoreReader, W: Clone + HeadersSelectedTipStoreReader, X: Clone + PruningStoreReader, Y: Clone + StatusesStoreReader> Clone for SyncManager<S, T, U, V, W, X, Y>
Source§fn clone(&self) -> SyncManager<S, T, U, V, W, X, Y>
fn clone(&self) -> SyncManager<S, T, U, V, W, X, Y>
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, X, Y> Freeze for SyncManager<S, T, U, V, W, X, Y>where
S: Freeze,
impl<S, T, U, V, W, X, Y> !RefUnwindSafe for SyncManager<S, T, U, V, W, X, Y>
impl<S, T, U, V, W, X, Y> Send for SyncManager<S, T, U, V, W, X, Y>
impl<S, T, U, V, W, X, Y> Sync for SyncManager<S, T, U, V, W, X, Y>
impl<S, T, U, V, W, X, Y> Unpin for SyncManager<S, T, U, V, W, X, Y>where
S: Unpin,
impl<S, T, U, V, W, X, Y> !UnwindSafe for SyncManager<S, T, U, V, W, X, Y>
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