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§
sourcefn block_epoch_index(&self, block_hash: &Byte32) -> Option<Byte32>
fn block_epoch_index(&self, block_hash: &Byte32) -> Option<Byte32>
Gets epoch index by block hash
sourcefn block_header(&self, block_hash: &Byte32) -> Option<HeaderView>
fn block_header(&self, block_hash: &Byte32) -> Option<HeaderView>
Gets block header by block hash
sourcefn cellbase(&self, block_hash: &Byte32) -> Option<TransactionView>
fn cellbase(&self, block_hash: &Byte32) -> Option<TransactionView>
Gets cellbase by block hash
Provided Methods§
sourcefn ancestor_epoch(
&self,
index: &Byte32,
target: EpochNumber
) -> Option<EpochExt>
fn ancestor_epoch( &self, index: &Byte32, target: EpochNumber ) -> Option<EpochExt>
Gets ancestor of specified epoch.