Post
Topic
Board Development & Technical Discussion
Topic OP
what dose CBlockIndex's nHeight use for?
by
lovecodelc
on 09/10/2016, 07:03:11 UTC
class "CBlockIndex" has one data memeber: nHeight, note:"//! height of the entry in the chain. The genesis block has height 0"
it means the number of block in blockchain?
such as genesis block's nHeight is 0, second block's nHeight is 1...?if so, when i run bitcoind program, i add one line code ""LogPrintf("%s\n", pindexNew->ToString()) "" in CBlockTreeDB's LoadBlockIndexGuts function, but in the debug.log file, i have not see nHeight=0 which CBlockIndex record has.
when program starts to run, it reads block index data(or brief block header data) from disk?