Struct ckb_shared::shared::Shared
source · [−]pub struct Shared { /* private fields */ }Expand description
TODO(doc): @quake
Implementations
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>
) -> 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>
) -> 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
Blanket Implementations
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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>
fn vzip(self) -> V
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