[bitcoin/bitcoin] validation: update pindexState for check level < 3 (#13431)

MarcoFalke commented on this pull request.

> // check level 4: try reconnecting blocks
if (nCheckLevel >= 4) {
– CBlockIndex *pindex = pindexState;
+ pindex = pindexState;

Since you moved `pindex` to the outer scope and made it visible here, they are already the same (both of them are set to pindex->pprev at the end of the previous for loop)

At this point pindexState is only used to calculate the number of blocks, so it could make sense to just remove it altogether and calculate the number of blocks through a index_lowest or num_blocks.

This post was last modified on June 13, 2018, 4:38 pm