Struct ckb_store::data_loader_wrapper::DataLoaderWrapper
source · pub struct DataLoaderWrapper<'a, T>(_);Expand description
TODO(doc): @quake
Implementations§
source§impl<'a, T: ChainStore> DataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> DataLoaderWrapper<'a, T>
Trait Implementations§
source§impl<'a, T: ChainStore> CellDataProvider for DataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> CellDataProvider for DataLoaderWrapper<'a, T>
source§fn get_cell_data(&self, out_point: &OutPoint) -> Option<Bytes>
fn get_cell_data(&self, out_point: &OutPoint) -> Option<Bytes>
Fetch cell_data from storage
source§fn get_cell_data_hash(&self, out_point: &OutPoint) -> Option<Byte32>
fn get_cell_data_hash(&self, out_point: &OutPoint) -> Option<Byte32>
Fetch cell_data_hash from storage, please note that loading a large amount of cell data
and calculating hash may be a performance bottleneck, so here is a separate fn designed
to facilitate caching. Read more
source§fn load_cell_data(&self, cell: &CellMeta) -> Option<Bytes>
fn load_cell_data(&self, cell: &CellMeta) -> Option<Bytes>
Load cell_data from memory, fallback to storage access
source§impl<'a, T: ChainStore> EpochProvider for DataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> EpochProvider for DataLoaderWrapper<'a, T>
source§fn get_epoch_ext(&self, header: &HeaderView) -> Option<EpochExt>
fn get_epoch_ext(&self, header: &HeaderView) -> Option<EpochExt>
Get corresponding
EpochExt by block headersource§fn get_block_epoch(&self, header: &HeaderView) -> Option<BlockEpoch>
fn get_block_epoch(&self, header: &HeaderView) -> Option<BlockEpoch>
Get corresponding epoch progress information by block header
source§impl<'a, T: ChainStore> HeaderProvider for DataLoaderWrapper<'a, T>
impl<'a, T: ChainStore> HeaderProvider for DataLoaderWrapper<'a, T>
source§fn get_header(&self, block_hash: &Byte32) -> Option<HeaderView>
fn get_header(&self, block_hash: &Byte32) -> Option<HeaderView>
Get the header of the given block hash