ckb_chain_spec::versionbits

Trait VersionbitsIndexer

Source
pub trait VersionbitsIndexer {
    // Required methods
    fn block_epoch_index(&self, block_hash: &Byte32) -> Option<Byte32>;
    fn epoch_ext(&self, index: &Byte32) -> Option<EpochExt>;
    fn block_header(&self, block_hash: &Byte32) -> Option<HeaderView>;
    fn cellbase(&self, block_hash: &Byte32) -> Option<TransactionView>;

    // Provided method
    fn ancestor_epoch(
        &self,
        index: &Byte32,
        target: EpochNumber,
    ) -> Option<EpochExt> { ... }
}
Expand description

VersionbitsIndexer

Required Methods§

Source

fn block_epoch_index(&self, block_hash: &Byte32) -> Option<Byte32>

Gets epoch index by block hash

Source

fn epoch_ext(&self, index: &Byte32) -> Option<EpochExt>

Gets epoch ext by index

Source

fn block_header(&self, block_hash: &Byte32) -> Option<HeaderView>

Gets block header by block hash

Source

fn cellbase(&self, block_hash: &Byte32) -> Option<TransactionView>

Gets cellbase by block hash

Provided Methods§

Source

fn ancestor_epoch( &self, index: &Byte32, target: EpochNumber, ) -> Option<EpochExt>

Gets ancestor of specified epoch.

Implementors§