[#BlockStatus]
= BlockStatus
:mrdocs:

Bit flags describing how far a block has been validated and which data is available for it&period;

== Synopsis

Declared in `&lt;chain&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
enum BlockStatus : uint32&lowbar;t;
----

== Members

[cols="1,4"]
|===
| Name| Description
| `BLOCK&lowbar;VALID&lowbar;UNKNOWN` 
| Unused&period;
| `BLOCK&lowbar;VALID&lowbar;RESERVED` 
| Reserved (was BLOCK&lowbar;VALID&lowbar;HEADER)&period;
| `BLOCK&lowbar;VALID&lowbar;TREE` 
| All parent headers found, difficulty matches, timestamp &gt;&equals; median previous&period; Implies all parents are also at least TREE&period;
| `BLOCK&lowbar;VALID&lowbar;TRANSACTIONS` 
| Only first tx is coinbase, 2 &lt;&equals; coinbase input script length &lt;&equals; 100, transactions valid, no duplicate txids, sigops, size, merkle root&period; Implies all parents are at least TREE but not necessarily TRANSACTIONS&period;
| `BLOCK&lowbar;VALID&lowbar;CHAIN` 
| Outputs do not overspend inputs, no double spends, coinbase output ok, no immature coinbase spends, BIP30&period; Implies all previous blocks back to the genesis block or an assumeutxo snapshot block are at least VALID&lowbar;CHAIN&period;
| `BLOCK&lowbar;VALID&lowbar;SCRIPTS` 
| Scripts &amp; signatures ok&period; Implies all previous blocks back to the genesis block or an assumeutxo snapshot block are at least VALID&lowbar;SCRIPTS&period;
| `BLOCK&lowbar;VALID&lowbar;MASK` 
| All validity bits&period;
| `BLOCK&lowbar;HAVE&lowbar;DATA` 
| full block available in blk&ast;&period;dat
| `BLOCK&lowbar;HAVE&lowbar;UNDO` 
| undo data available in rev&ast;&period;dat
| `BLOCK&lowbar;HAVE&lowbar;MASK` 
| combined mask of the block&hyphen;data availability flags
| `BLOCK&lowbar;FAILED&lowbar;VALID` 
| stage after last reached validness failed
| `BLOCK&lowbar;FAILED&lowbar;CHILD` 
| Unused flag that was previously set when descending from failed block
| `BLOCK&lowbar;OPT&lowbar;WITNESS` 
| block data in blk&ast;&period;dat was received with a witness&hyphen;enforcing client
| `BLOCK&lowbar;STATUS&lowbar;RESERVED` 
| Unused flag that was previously set on assumeutxo snapshot blocks and their ancestors before they were validated, and unset when they were validated&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
