Struct ckb_shared::shared::Shared
source · [−]pub struct Shared { /* private fields */ }Expand description
TODO(doc): @quake
Implementations
sourceimpl Shared
impl Shared
sourcepub fn new(
store: ChainDB,
tx_pool_controller: TxPoolController,
notify_controller: NotifyController,
txs_verify_cache: Arc<TokioRwLock<TxVerificationCache>>,
consensus: Arc<Consensus>,
snapshot_mgr: Arc<SnapshotMgr>,
async_handle: Handle,
ibd_finished: Arc<AtomicBool>,
relay_tx_sender: Sender<TxVerificationResult>
) -> Shared
pub fn new(
store: ChainDB,
tx_pool_controller: TxPoolController,
notify_controller: NotifyController,
txs_verify_cache: Arc<TokioRwLock<TxVerificationCache>>,
consensus: Arc<Consensus>,
snapshot_mgr: Arc<SnapshotMgr>,
async_handle: Handle,
ibd_finished: Arc<AtomicBool>,
relay_tx_sender: Sender<TxVerificationResult>
) -> Shared
Construct new Shared
sourcepub fn spawn_freeze(&self) -> Option<FreezerClose>
pub fn spawn_freeze(&self) -> Option<FreezerClose>
Spawn freeze background thread that periodically checks and moves ancient data from the kv database into the freezer.
sourcepub fn tx_pool_controller(&self) -> &TxPoolController
pub fn tx_pool_controller(&self) -> &TxPoolController
TODO(doc): @quake
sourcepub fn txs_verify_cache(&self) -> Arc<TokioRwLock<TxVerificationCache>>
pub fn txs_verify_cache(&self) -> Arc<TokioRwLock<TxVerificationCache>>
TODO(doc): @quake
sourcepub fn notify_controller(&self) -> &NotifyController
pub fn notify_controller(&self) -> &NotifyController
TODO(doc): @quake
sourcepub fn store_snapshot(&self, snapshot: Arc<Snapshot>)
pub fn store_snapshot(&self, snapshot: Arc<Snapshot>)
TODO(doc): @quake
sourcepub fn refresh_snapshot(&self)
pub fn refresh_snapshot(&self)
TODO(doc): @quake
sourcepub fn new_snapshot(
&self,
tip_header: HeaderView,
total_difficulty: U256,
epoch_ext: EpochExt,
proposals: ProposalView
) -> Arc<Snapshot>
pub fn new_snapshot(
&self,
tip_header: HeaderView,
total_difficulty: U256,
epoch_ext: EpochExt,
proposals: ProposalView
) -> Arc<Snapshot>
TODO(doc): @quake
sourcepub fn async_handle(&self) -> &Handle
pub fn async_handle(&self) -> &Handle
Return async runtime handle
sourcepub fn genesis_hash(&self) -> Byte32
pub fn genesis_hash(&self) -> Byte32
TODO(doc): @quake
sourcepub fn is_initial_block_download(&self) -> bool
pub fn is_initial_block_download(&self) -> bool
Return whether chain is in initial block download
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Shared
impl Send for Shared
impl Sync for Shared
impl Unpin for Shared
impl !UnwindSafe for Shared
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more