[−][src]Struct ckb_snapshot::Snapshot
Implementations
impl Snapshot
[src]
pub fn new(
tip_header: HeaderView,
total_difficulty: U256,
epoch_ext: EpochExt,
store: StoreSnapshot,
proposals: ProposalView,
consensus: Arc<Consensus>
) -> Snapshot
[src]
tip_header: HeaderView,
total_difficulty: U256,
epoch_ext: EpochExt,
store: StoreSnapshot,
proposals: ProposalView,
consensus: Arc<Consensus>
) -> Snapshot
pub fn refresh(&self, store: StoreSnapshot) -> Snapshot
[src]
pub fn tip_header(&self) -> &HeaderView
[src]
pub fn tip_number(&self) -> BlockNumber
[src]
pub fn tip_hash(&self) -> Byte32
[src]
pub fn epoch_ext(&self) -> &EpochExt
[src]
pub fn consensus(&self) -> &Consensus
[src]
pub fn cloned_consensus(&self) -> Arc<Consensus>
[src]
pub fn proposals(&self) -> &ProposalView
[src]
pub fn total_difficulty(&self) -> &U256
[src]
pub fn finalize_block_reward(
&self,
parent: &HeaderView
) -> Result<(Script, BlockReward), Error>
[src]
&self,
parent: &HeaderView
) -> Result<(Script, BlockReward), Error>
Trait Implementations
impl BlockMedianTimeContext for Snapshot
[src]
fn median_block_count(&self) -> u64
[src]
fn timestamp_and_parent(&self, block_hash: &Byte32) -> (u64, u64, Byte32)
[src]
fn block_median_time(&self, block_hash: &Byte32) -> u64
[src]
impl CellProvider for Snapshot
[src]
fn cell(&self, out_point: &OutPoint, with_data: bool) -> CellStatus
[src]
impl<'a> ChainStore<'a> for Snapshot
[src]
type Vector = DBPinnableSlice<'a>
fn cache(&'a self) -> Option<&'a StoreCache>
[src]
fn get(&'a self, col: Col, key: &[u8]) -> Option<Self::Vector>
[src]
fn get_iter(&self, col: Col, mode: IteratorMode<'_>) -> DBIter<'_>
[src]
fn get_tip_header(&self) -> Option<HeaderView>
[src]
fn get_current_epoch_ext(&'a self) -> Option<EpochExt>
[src]
fn cell_provider(&self) -> CellProviderWrapper<'_, Self>
[src]
fn get_block(&'a self, h: &Byte32) -> Option<BlockView>
[src]
fn get_block_header(&'a self, hash: &Byte32) -> Option<HeaderView>
[src]
fn get_block_body(&'a self, hash: &Byte32) -> Vec<TransactionView>
[src]
fn get_block_txs_hashes(&'a self, hash: &Byte32) -> Vec<Byte32>
[src]
fn get_block_proposal_txs_ids(
&'a self,
hash: &Byte32
) -> Option<ProposalShortIdVec>
[src]
&'a self,
hash: &Byte32
) -> Option<ProposalShortIdVec>
fn get_block_uncles(&'a self, hash: &Byte32) -> Option<UncleBlockVecView>
[src]
fn get_block_ext(&'a self, block_hash: &Byte32) -> Option<BlockExt>
[src]
fn get_block_hash(&'a self, number: u64) -> Option<Byte32>
[src]
fn get_block_number(&'a self, hash: &Byte32) -> Option<u64>
[src]
fn is_main_chain(&'a self, hash: &Byte32) -> bool
[src]
fn get_transaction(&'a self, hash: &Byte32) -> Option<(TransactionView, Byte32)>
[src]
fn get_transaction_with_info(
&'a self,
hash: &Byte32
) -> Option<(TransactionView, TransactionInfo)>
[src]
&'a self,
hash: &Byte32
) -> Option<(TransactionView, TransactionInfo)>
fn get_transaction_info(&'a self, hash: &Byte32) -> Option<TransactionInfo>
[src]
fn get_cell(&'a self, out_point: &OutPoint) -> Option<CellMeta>
[src]
fn get_cell_data(&'a self, out_point: &OutPoint) -> Option<(Bytes, Byte32)>
[src]
fn get_epoch_ext(&'a self, hash: &Byte32) -> Option<EpochExt>
[src]
fn get_epoch_index(&'a self, number: u64) -> Option<Byte32>
[src]
fn get_block_epoch_index(&'a self, block_hash: &Byte32) -> Option<Byte32>
[src]
fn get_block_epoch(&'a self, hash: &Byte32) -> Option<EpochExt>
[src]
fn is_uncle(&'a self, hash: &Byte32) -> bool
[src]
fn get_uncle_header(&'a self, hash: &Byte32) -> Option<HeaderView>
[src]
fn block_exists(&'a self, hash: &Byte32) -> bool
[src]
fn get_cellbase(&'a self, hash: &Byte32) -> Option<TransactionView>
[src]
fn next_epoch_ext(
&'a self,
consensus: &Consensus,
last_epoch: &EpochExt,
header: &HeaderView
) -> Option<EpochExt>
[src]
&'a self,
consensus: &Consensus,
last_epoch: &EpochExt,
header: &HeaderView
) -> Option<EpochExt>
fn get_packed_block(&'a self, hash: &Byte32) -> Option<Block>
[src]
fn get_packed_block_header(&'a self, hash: &Byte32) -> Option<Header>
[src]
impl HeaderChecker for Snapshot
[src]
impl HeaderProvider for Snapshot
[src]
fn get_header(&self, hash: &Byte32) -> Option<HeaderView>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl !UnwindSafe for Snapshot
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,