@@ -113,10 +113,10 @@ enum BlockStatus : uint32_t {
113
113
BLOCK_VALID_TRANSACTIONS = 3 ,
114
114
115
115
// ! Outputs do not overspend inputs, no double spends, coinbase output ok, no immature coinbase spends, BIP30.
116
- // ! Implies all parents are also at least CHAIN.
116
+ // ! Implies all parents are either at least VALID_CHAIN, or are ASSUMED_VALID
117
117
BLOCK_VALID_CHAIN = 4 ,
118
118
119
- // ! Scripts & signatures ok. Implies all parents are also at least SCRIPTS .
119
+ // ! Scripts & signatures ok. Implies all parents are either at least VALID_SCRIPTS, or are ASSUMED_VALID .
120
120
BLOCK_VALID_SCRIPTS = 5 ,
121
121
122
122
// ! All validity bits.
@@ -134,10 +134,18 @@ enum BlockStatus : uint32_t {
134
134
BLOCK_OPT_WITNESS = 128 , // !< block data in blk*.dat was received with a witness-enforcing client
135
135
136
136
/* *
137
- * If set, this indicates that the block index entry is assumed-valid.
138
- * Certain diagnostics will be skipped in e.g. CheckBlockIndex().
139
- * It almost certainly means that the block's full validation is pending
140
- * on a background chainstate. See `doc/design/assumeutxo.md`.
137
+ * If ASSUMED_VALID is set, it means that this block has not been validated
138
+ * and has validity status less than VALID_SCRIPTS. Also that it may have
139
+ * descendant blocks with VALID_SCRIPTS set, because they can be validated
140
+ * based on an assumeutxo snapshot.
141
+ *
142
+ * When an assumeutxo snapshot is loaded, the ASSUMED_VALID flag is added to
143
+ * unvalidated blocks at the snapshot height and below. Then, as the background
144
+ * validation progresses, and these blocks are validated, the ASSUMED_VALID
145
+ * flags are removed. See `doc/design/assumeutxo.md` for details.
146
+ *
147
+ * This flag is only used to implement checks in CheckBlockIndex() and
148
+ * should not be used elsewhere.
141
149
*/
142
150
BLOCK_ASSUMED_VALID = 256 ,
143
151
};
0 commit comments