[][src]Struct elements::BlockHeader

pub struct BlockHeader {
    pub version: u32,
    pub prev_blockhash: BlockHash,
    pub merkle_root: TxMerkleNode,
    pub time: u32,
    pub height: u32,
    pub ext: ExtData,

Elements block header


version: u32

Version - should be 0x20000000 except when versionbits signalling

prev_blockhash: BlockHash

Previous blockhash

merkle_root: TxMerkleNode

Transaction Merkle root

time: u32

Block timestamp

height: u32

Block height

ext: ExtData

Block signature and dynamic federation-related data


impl BlockHeader[src]

pub fn is_dynafed(&self) -> bool[src]

Returns true if this is a block with dynamic federations enabled.

pub fn clear_witness(&mut self)[src]

Remove the witness data of the block header. This is all the data that can be removed without changing the block hash.

pub fn calculate_dynafed_params_root(&self) -> Option<Midstate>[src]

Calculate the root of the dynafed params. Returns None when not dynafed.

Trait Implementations

impl BitcoinHash<BlockHash> for BlockHeader[src]

impl Clone for BlockHeader[src]

impl Debug for BlockHeader[src]

impl Decodable for BlockHeader[src]

impl Default for BlockHeader[src]

impl Encodable for BlockHeader[src]

impl Eq for BlockHeader[src]

impl Hash for BlockHeader[src]

impl PartialEq<BlockHeader> for BlockHeader[src]

impl StructuralEq for BlockHeader[src]

impl StructuralPartialEq for BlockHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.