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§
Sourcefn get_header_fields(&self, hash: &Byte32) -> Option<HeaderFields>
fn get_header_fields(&self, hash: &Byte32) -> Option<HeaderFields>
Get the header fields of the given block hash
Provided Methods§
Sourcefn block_median_time(
&self,
block_hash: &Byte32,
median_block_count: usize,
) -> u64
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