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§