CBlockIndex*pindexFirstInvalid=NULL;// Oldest ancestor of pindex which is invalid.
CBlockIndex*pindexFirstInvalid=NULL;// Oldest ancestor of pindex which is invalid.
CBlockIndex*pindexFirstMissing=NULL;// Oldest ancestor of pindex which does not have BLOCK_HAVE_DATA.
CBlockIndex*pindexFirstMissing=NULL;// Oldest ancestor of pindex which does not have BLOCK_HAVE_DATA.
CBlockIndex*pindexFirstNotTreeValid=NULL;// Oldest ancestor of pindex which does not have BLOCK_VALID_TREE (regardless of being valid or not).
CBlockIndex*pindexFirstNotTreeValid=NULL;// Oldest ancestor of pindex which does not have BLOCK_VALID_TREE (regardless of being valid or not).
CBlockIndex*pindexFirstNotTransactionsValid=NULL;// Oldest ancestor of pindex which does not have BLOCK_VALID_TRANSACTIONS (regardless of being valid or not).
CBlockIndex*pindexFirstNotChainValid=NULL;// Oldest ancestor of pindex which does not have BLOCK_VALID_CHAIN (regardless of being valid or not).
CBlockIndex*pindexFirstNotChainValid=NULL;// Oldest ancestor of pindex which does not have BLOCK_VALID_CHAIN (regardless of being valid or not).
CBlockIndex*pindexFirstNotScriptsValid=NULL;// Oldest ancestor of pindex which does not have BLOCK_VALID_SCRIPTS (regardless of being valid or not).
CBlockIndex*pindexFirstNotScriptsValid=NULL;// Oldest ancestor of pindex which does not have BLOCK_VALID_SCRIPTS (regardless of being valid or not).
assert(pindex->nHeight==nHeight);// nHeight must be consistent.
assert(pindex->nHeight==nHeight);// nHeight must be consistent.
assert(pindex->pprev==NULL||pindex->nChainWork>=pindex->pprev->nChainWork);// For every block except the genesis block, the chainwork must be larger than the parent's.
assert(pindex->pprev==NULL||pindex->nChainWork>=pindex->pprev->nChainWork);// For every block except the genesis block, the chainwork must be larger than the parent's.
assert(nHeight<2||(pindex->pskip&&(pindex->pskip->nHeight<nHeight)));// The pskip pointer must point back for all but the first 2 blocks.
assert(nHeight<2||(pindex->pskip&&(pindex->pskip->nHeight<nHeight)));// The pskip pointer must point back for all but the first 2 blocks.