[][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

Fields

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

Methods

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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.