Update `BlockHeader::version` documentation

This commit is contained in:
Dawid Ciężarkiewicz 2022-05-27 16:45:21 -07:00
parent 99ae48ab01
commit f4922f6fe7
1 changed files with 6 additions and 1 deletions

View File

@ -42,7 +42,12 @@ use crate::VarInt;
#[derive(Copy, PartialEq, Eq, Clone, Debug)] #[derive(Copy, PartialEq, Eq, Clone, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct BlockHeader { pub struct BlockHeader {
/// The protocol version. Should always be 1. /// Originally protocol version, but repurposed for soft-fork signaling.
///
/// ### Relevant BIPs
///
/// * [BIP9 - Version bits with timeout and delay](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki) (current usage)
/// * [BIP34 - Block v2, Height in Coinbase](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki)
pub version: i32, pub version: i32,
/// Reference to the previous block in the chain. /// Reference to the previous block in the chain.
pub prev_blockhash: BlockHash, pub prev_blockhash: BlockHash,