message: [Bug] Fix contextCheckBlock for the first  block that it's a v1 block.
diff: @@ -4711,7 +4711,7 @@ bool IsTransactionInChain(const uint256& txId, int& nHeightTx)
  bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIndex* const pindexPrev)
  {
  - const int nHeight = pindexPrev == NULL ? 0 : pindexPrev->nHeight + 1;
  + const int nHeight = pindexPrev == nullptr ? 0 : pindexPrev->nHeight + 1;
  // Check that all transactions are finalized
  for (const CTransaction& tx : block.vtx)
  @@ -4720,10 +4720,13 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
  }
  // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
  + if (pindexPrev) { // pindexPrev is only null on the first block which is a version 1 block.
  CScript expect = CScript() << nHeight;
  if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
  !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) {
  - return state.DoS(100, error("%s : block height mismatch in coinbase", __func__), REJECT_INVALID, "bad-cb-height");
  + return state.DoS(100, error("%s : block height mismatch in coinbase", __func__), REJECT_INVALID,
  + "bad-cb-height");
  + }
  }
  return true;
  