Struct ckb_store::StoreTransaction
source · pub struct StoreTransaction { /* private fields */ }
Expand description
TODO(doc): @quake
Implementations§
source§impl StoreTransaction
impl StoreTransaction
sourcepub fn insert_raw(&self, col: Col, key: &[u8], value: &[u8]) -> Result<(), Error>
pub fn insert_raw(&self, col: Col, key: &[u8], value: &[u8]) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn get_snapshot(&self) -> StoreTransactionSnapshot<'_>
pub fn get_snapshot(&self) -> StoreTransactionSnapshot<'_>
TODO(doc): @quake
sourcepub fn get_update_for_tip_hash(
&self,
snapshot: &StoreTransactionSnapshot<'_>
) -> Option<Byte32>
pub fn get_update_for_tip_hash(
&self,
snapshot: &StoreTransactionSnapshot<'_>
) -> Option<Byte32>
TODO(doc): @quake
sourcepub fn insert_tip_header(&self, h: &HeaderView) -> Result<(), Error>
pub fn insert_tip_header(&self, h: &HeaderView) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn insert_block_ext(
&self,
block_hash: &Byte32,
ext: &BlockExt
) -> Result<(), Error>
pub fn insert_block_ext(
&self,
block_hash: &Byte32,
ext: &BlockExt
) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn insert_block_epoch_index(
&self,
block_hash: &Byte32,
epoch_hash: &Byte32
) -> Result<(), Error>
pub fn insert_block_epoch_index(
&self,
block_hash: &Byte32,
epoch_hash: &Byte32
) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn insert_epoch_ext(
&self,
hash: &Byte32,
epoch: &EpochExt
) -> Result<(), Error>
pub fn insert_epoch_ext(
&self,
hash: &Byte32,
epoch: &EpochExt
) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn insert_current_epoch_ext(&self, epoch: &EpochExt) -> Result<(), Error>
pub fn insert_current_epoch_ext(&self, epoch: &EpochExt) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn insert_cells(
&self,
cells: impl Iterator<Item = (OutPoint, CellEntry, Option<CellDataEntry>)>
) -> Result<(), Error>
pub fn insert_cells(
&self,
cells: impl Iterator<Item = (OutPoint, CellEntry, Option<CellDataEntry>)>
) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn delete_cells(
&self,
out_points: impl Iterator<Item = OutPoint>
) -> Result<(), Error>
pub fn delete_cells(
&self,
out_points: impl Iterator<Item = OutPoint>
) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn insert_header_digest(
&self,
position_u64: u64,
header_digest: &HeaderDigest
) -> Result<(), Error>
pub fn insert_header_digest(
&self,
position_u64: u64,
header_digest: &HeaderDigest
) -> Result<(), Error>
Inserts a header digest.
Trait Implementations§
source§impl CellChecker for StoreTransaction
impl CellChecker for StoreTransaction
source§impl CellProvider for StoreTransaction
impl CellProvider for StoreTransaction
source§impl ChainStore for StoreTransaction
impl ChainStore for StoreTransaction
source§fn cache(&self) -> Option<&StoreCache>
fn cache(&self) -> Option<&StoreCache>
TODO(doc): @quake
source§fn get(&self, col: Col, key: &[u8]) -> Option<DBPinnableSlice<'_>>
fn get(&self, col: Col, key: &[u8]) -> Option<DBPinnableSlice<'_>>
Return the bytes associated with a key value and the given column family.
source§fn as_data_provider(&self) -> DataLoaderWrapper<'_, Self>
fn as_data_provider(&self) -> DataLoaderWrapper<'_, Self>
Return the provider trait default implementation
source§fn get_block_header(&self, hash: &Byte32) -> Option<HeaderView>
fn get_block_header(&self, hash: &Byte32) -> Option<HeaderView>
Get header by block header hash
source§fn get_block_body(&self, hash: &Byte32) -> Vec<TransactionView> ⓘ
fn get_block_body(&self, hash: &Byte32) -> Vec<TransactionView> ⓘ
Get block body by block header hash
source§fn get_unfrozen_block(&self, hash: &Byte32) -> Option<BlockView>
fn get_unfrozen_block(&self, hash: &Byte32) -> Option<BlockView>
Get unfrozen block from ky-store with given hash
source§fn get_block_txs_hashes(&self, hash: &Byte32) -> Vec<Byte32> ⓘ
fn get_block_txs_hashes(&self, hash: &Byte32) -> Vec<Byte32> ⓘ
Get all transaction-hashes in block body by block header hash
source§fn get_block_proposal_txs_ids(&self, hash: &Byte32) -> Option<ProposalShortIdVec>
fn get_block_proposal_txs_ids(&self, hash: &Byte32) -> Option<ProposalShortIdVec>
Get proposal short id by block header hash
source§fn get_block_uncles(&self, hash: &Byte32) -> Option<UncleBlockVecView>
fn get_block_uncles(&self, hash: &Byte32) -> Option<UncleBlockVecView>
Get block uncles by block header hash
source§fn get_block_extension(&self, hash: &Byte32) -> Option<Bytes>
fn get_block_extension(&self, hash: &Byte32) -> Option<Bytes>
Get block extension by block header hash
source§fn get_block_ext(&self, block_hash: &Byte32) -> Option<BlockExt>
fn get_block_ext(&self, block_hash: &Byte32) -> Option<BlockExt>
Get block ext by block header hash Read more
source§fn get_block_hash(&self, number: BlockNumber) -> Option<Byte32>
fn get_block_hash(&self, number: BlockNumber) -> Option<Byte32>
Get block header hash by block number
source§fn get_block_number(&self, hash: &Byte32) -> Option<BlockNumber>
fn get_block_number(&self, hash: &Byte32) -> Option<BlockNumber>
Get block number by block header hash
source§fn is_main_chain(&self, hash: &Byte32) -> bool
fn is_main_chain(&self, hash: &Byte32) -> bool
TODO(doc): @quake
source§fn get_tip_header(&self) -> Option<HeaderView>
fn get_tip_header(&self) -> Option<HeaderView>
TODO(doc): @quake
source§fn transaction_exists(&self, hash: &Byte32) -> bool
fn transaction_exists(&self, hash: &Byte32) -> bool
Returns true if the transaction confirmed in main chain. Read more
source§fn get_transaction(&self, hash: &Byte32) -> Option<(TransactionView, Byte32)>
fn get_transaction(&self, hash: &Byte32) -> Option<(TransactionView, Byte32)>
Get commit transaction and block hash by its hash
source§fn get_transaction_info(&self, hash: &Byte32) -> Option<TransactionInfo>
fn get_transaction_info(&self, hash: &Byte32) -> Option<TransactionInfo>
TODO(doc): @quake
source§fn get_transaction_with_info(
&self,
hash: &Byte32
) -> Option<(TransactionView, TransactionInfo)>
fn get_transaction_with_info(
&self,
hash: &Byte32
) -> Option<(TransactionView, TransactionInfo)>
Gets transaction and associated info with correspond hash
source§fn get_cell(&self, out_point: &OutPoint) -> Option<CellMeta>
fn get_cell(&self, out_point: &OutPoint) -> Option<CellMeta>
Gets cell meta data with out_point
source§fn get_current_epoch_ext(&self) -> Option<EpochExt>
fn get_current_epoch_ext(&self) -> Option<EpochExt>
Gets current epoch ext
source§fn get_epoch_index(&self, number: EpochNumber) -> Option<Byte32>
fn get_epoch_index(&self, number: EpochNumber) -> Option<Byte32>
Gets epoch index by epoch number
source§fn get_block_epoch_index(&self, block_hash: &Byte32) -> Option<Byte32>
fn get_block_epoch_index(&self, block_hash: &Byte32) -> Option<Byte32>
Gets epoch index by block hash
source§fn get_uncle_header(&self, hash: &Byte32) -> Option<HeaderView>
fn get_uncle_header(&self, hash: &Byte32) -> Option<HeaderView>
Gets header by uncle header hash
source§fn block_exists(&self, hash: &Byte32) -> bool
fn block_exists(&self, hash: &Byte32) -> bool
TODO(doc): @quake
source§fn get_cellbase(&self, hash: &Byte32) -> Option<TransactionView>
fn get_cellbase(&self, hash: &Byte32) -> Option<TransactionView>
Gets cellbase by block hash
source§fn get_latest_built_filter_data_block_hash(&self) -> Option<Byte32>
fn get_latest_built_filter_data_block_hash(&self) -> Option<Byte32>
Gets latest built filter data block hash
source§fn get_block_filter(&self, hash: &Byte32) -> Option<Bytes>
fn get_block_filter(&self, hash: &Byte32) -> Option<Bytes>
Gets block filter data by block hash
source§fn get_header_digest(&self, position_u64: u64) -> Option<HeaderDigest>
fn get_header_digest(&self, position_u64: u64) -> Option<HeaderDigest>
Gets a header digest.
source§impl MMRStore<HeaderDigest> for &StoreTransaction
impl MMRStore<HeaderDigest> for &StoreTransaction
source§impl VersionbitsIndexer for StoreTransaction
impl VersionbitsIndexer for StoreTransaction
source§fn 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
source§fn block_header(&self, block_hash: &Byte32) -> Option<HeaderView>
fn block_header(&self, block_hash: &Byte32) -> Option<HeaderView>
Gets block header by block hash