How to get block height, if I have only block header? Imagine I executed ReadBlockFromDisk and now I have valid instance of CBlock. 

How do I read height of this block?

CBlock block = ...;
CBlockIndex index(block);
assert (index.nHeight != 0); // fails, nHeight is default initialized
It looks like this function from validation.h does the job:

CBlockIndex* LookupBlockIndex(const uint256&amp; hash)