From f4922f6fe761bf14bc8f4709fb92eda50fff85e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ci=C4=99=C5=BCarkiewicz?= Date: Fri, 27 May 2022 16:45:21 -0700 Subject: [PATCH] Update `BlockHeader::version` documentation --- src/blockdata/block.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/blockdata/block.rs b/src/blockdata/block.rs index 06a53298..eec8425b 100644 --- a/src/blockdata/block.rs +++ b/src/blockdata/block.rs @@ -42,7 +42,12 @@ use crate::VarInt; #[derive(Copy, PartialEq, Eq, Clone, Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 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, /// Reference to the previous block in the chain. pub prev_blockhash: BlockHash,