nChainTx is returned by RPCs and is used to estimate (sync and rescan) progress.
However, it is also used for consensus and P2P logic to denote that a block and all its parents have BLOCK_VALID_TRANSACTIONS set.
This is confusing, because:
- It would be clearer to use the
BlockStatusenum for this as well. - It requires AssumeUtxo to fake the
nChainTxvalues. - It makes it harder to remove
nChainTxcompletely, or limit it to code that needs it (estimate sync and scan progress and report it on RPC).
Fix it by introducing a new BLOCK_VALID_TRANSACTIONS_TREE level and use it where possible.