ckb_traits

Trait HeaderFieldsProvider

Source
pub trait HeaderFieldsProvider {
    // Required method
    fn get_header_fields(&self, hash: &Byte32) -> Option<HeaderFields>;

    // Provided method
    fn block_median_time(
        &self,
        block_hash: &Byte32,
        median_block_count: usize,
    ) -> u64 { ... }
}
Expand description

Trait for header fields storage

Required Methods§

Source

fn get_header_fields(&self, hash: &Byte32) -> Option<HeaderFields>

Get the header fields of the given block hash

Provided Methods§

Source

fn block_median_time( &self, block_hash: &Byte32, median_block_count: usize, ) -> u64

Get past block median time, including the timestamp of the given one

Implementors§