diff options
author | fanquake <fanquake@gmail.com> | 2019-08-30 08:31:08 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-08-30 08:47:03 +0800 |
commit | 74da99e010744e8759e728a6e136e13c9b3ba433 (patch) | |
tree | 2468ef5199377d2df90946293e02509a5c83a61d /src | |
parent | bcf7004a8945a5e837483a3826a7ffeb374e9b44 (diff) | |
parent | fa0b910486e9aada077fe47e1201dcb3bd523c87 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/chain.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chain.h b/src/chain.h index dd9cc2a598..1b67ebbe41 100644 --- a/src/chain.h +++ b/src/chain.h @@ -95,8 +95,8 @@ enum BlockStatus: uint32_t { //! Unused. BLOCK_VALID_UNKNOWN = 0, - //! Parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future - BLOCK_VALID_HEADER = 1, + //! Reserved (was BLOCK_VALID_HEADER). + BLOCK_VALID_RESERVED = 1, //! All parent headers found, difficulty matches, timestamp >= median previous, checkpoint. Implies all parents //! are also at least TREE. @@ -117,7 +117,7 @@ enum BlockStatus: uint32_t { BLOCK_VALID_SCRIPTS = 5, //! 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_HAVE_DATA = 8, //!< full block available in blk*.dat |