Struct bitcoin::blockdata::block::Block [−][src]
pub struct Block { pub header: BlockHeader, pub txdata: Vec<Transaction>, }
Expand description
A Bitcoin block, which is a collection of transactions with an attached proof of work.
Fields
header: BlockHeader
The block header
txdata: Vec<Transaction>
List of transactions contained in the block
Implementations
Return the block hash.
check if merkle root of header matches merkle root of the transaction list
check if witness commitment in coinbase is matching the transaction list
Calculate the transaction merkle root.
pub fn compute_witness_commitment(
witness_root: &WitnessMerkleNode,
witness_reserved_value: &[u8]
) -> WitnessCommitment
[src]
pub fn compute_witness_commitment(
witness_root: &WitnessMerkleNode,
witness_reserved_value: &[u8]
) -> WitnessCommitment
[src]compute witness commitment for the transaction list
Merkle root of transactions hashed for witness
Get the weight of the block
Get the coinbase transaction, if one is present.
Get the block height as encoded into the coinbase according to BIP34. Returns None if not present.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Block
impl UnwindSafe for Block
Blanket Implementations
Mutably borrows from an owned value. Read more