Skip to content

Commit 74da99e

Browse files
committed
Merge #14862: doc: Declare BLOCK_VALID_HEADER reserved
fa0b910 [doc] chain: Declare BLOCK_VALID_HEADER reserved (MarcoFalke) Pull request description: `BLOCK_VALID_HEADER` was never used and the comment is confusing to me in several ways: * It claims "version ok". However, without the previous header, it is not possible to check the validity of the version since the height needs to be known (c.f. BIP 90) * It claims "hash satisfies claimed PoW". While it is possible to check against the claimed PoW, it is not possible without the previous header to check that the claimed PoW is itself valid. * It claims "1 <= vtx count <= max". However, with the header alone and current consensus rules, the number of transactions is unknown. ACKs for top commit: sipa: ACK fa0b910 ryanofsky: ACK fa0b910 Tree-SHA512: 3972995a0a2f83aa55767bf8982af1fcb9493483f62aee6df27e58be9181a48d5968ae718b390cecc8be3ed4f26495683b1cffde8ef272dea0bd610ec169ef8b
2 parents bcf7004 + fa0b910 commit 74da99e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/chain.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ enum BlockStatus: uint32_t {
9595
//! Unused.
9696
BLOCK_VALID_UNKNOWN = 0,
9797

98-
//! Parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
99-
BLOCK_VALID_HEADER = 1,
98+
//! Reserved (was BLOCK_VALID_HEADER).
99+
BLOCK_VALID_RESERVED = 1,
100100

101101
//! All parent headers found, difficulty matches, timestamp >= median previous, checkpoint. Implies all parents
102102
//! are also at least TREE.
@@ -117,7 +117,7 @@ enum BlockStatus: uint32_t {
117117
BLOCK_VALID_SCRIPTS = 5,
118118

119119
//! All validity bits.
120-
BLOCK_VALID_MASK = BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
120+
BLOCK_VALID_MASK = BLOCK_VALID_RESERVED | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
121121
BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
122122

123123
BLOCK_HAVE_DATA = 8, //!< full block available in blk*.dat

0 commit comments

Comments
 (0)