Trait ckb_types::prelude::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.

Object Safety§

This trait is not object safe.

Implementors§