mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #14862: doc: Declare BLOCK_VALID_HEADER reserved
fa0b910486e9aada077fe47e1201dcb3bd523c87 [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 fa0b910486e9aada077fe47e1201dcb3bd523c87 ryanofsky: ACK fa0b910486e9aada077fe47e1201dcb3bd523c87 Tree-SHA512: 3972995a0a2f83aa55767bf8982af1fcb9493483f62aee6df27e58be9181a48d5968ae718b390cecc8be3ed4f26495683b1cffde8ef272dea0bd610ec169ef8b
This commit is contained in:
parent
12b5403aa6
commit
04d768d09a
@ -121,8 +121,8 @@ enum BlockStatus: uint32_t {
|
|||||||
//! Unused.
|
//! Unused.
|
||||||
BLOCK_VALID_UNKNOWN = 0,
|
BLOCK_VALID_UNKNOWN = 0,
|
||||||
|
|
||||||
//! Parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
|
//! Reserved (was BLOCK_VALID_HEADER).
|
||||||
BLOCK_VALID_HEADER = 1,
|
BLOCK_VALID_RESERVED = 1,
|
||||||
|
|
||||||
//! All parent headers found, difficulty matches, timestamp >= median previous, checkpoint. Implies all parents
|
//! All parent headers found, difficulty matches, timestamp >= median previous, checkpoint. Implies all parents
|
||||||
//! are also at least TREE.
|
//! are also at least TREE.
|
||||||
@ -143,7 +143,7 @@ enum BlockStatus: uint32_t {
|
|||||||
BLOCK_VALID_SCRIPTS = 5,
|
BLOCK_VALID_SCRIPTS = 5,
|
||||||
|
|
||||||
//! All validity bits.
|
//! All validity bits.
|
||||||
BLOCK_VALID_MASK = BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
|
BLOCK_VALID_MASK = BLOCK_VALID_RESERVED | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
|
||||||
BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
|
BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
|
||||||
|
|
||||||
BLOCK_HAVE_DATA = 8, //!< full block available in blk*.dat
|
BLOCK_HAVE_DATA = 8, //!< full block available in blk*.dat
|
||||||
|
Loading…
Reference in New Issue
Block a user