// SPDX-License-Identifier: CC0-1.0 //! Bitcoin blocks. //! //! A block is a bundle of transactions with a proof-of-work attached, //! which commits to an earlier block to form the blockchain. This //! module describes structures and functions needed to describe //! these blocks and the blockchain. use hashes::sha256d; hashes::hash_newtype! { /// A bitcoin block hash. pub struct BlockHash(sha256d::Hash); /// A hash corresponding to the witness structure commitment in the coinbase transaction. pub struct WitnessCommitment(sha256d::Hash); } impl BlockHash { /// Dummy hash used as the previous blockhash of the genesis block. pub const GENESIS_PREVIOUS_BLOCK_HASH: Self = Self::from_byte_array([0; 32]); }