ckb_types::prelude

Trait BuildCompactBlock

Source
pub trait BuildCompactBlock {
    // Required methods
    fn build_from_block(
        block: &BlockView,
        prefilled_transactions_indexes: &HashSet<usize>,
    ) -> CompactBlock;
    fn block_short_ids(&self) -> Vec<Option<ProposalShortId>>;
    fn short_id_indexes(&self) -> Vec<usize>;
}
Expand description

Trait for building a compact block from a BlockView.

Required Methods§

Source

fn build_from_block( block: &BlockView, prefilled_transactions_indexes: &HashSet<usize>, ) -> CompactBlock

Builds a compact block from a BlockView and a set of prefilled transaction indexes.

Source

fn block_short_ids(&self) -> Vec<Option<ProposalShortId>>

Returns the short IDs of the transactions in the compact block.

Source

fn short_id_indexes(&self) -> Vec<usize>

Returns the indexes of the short IDs in the compact block.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§