diff --git a/src/validation.cpp b/src/validation.cpp index 6f3150e9e..9a4d58172 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1782,7 +1782,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin // Special case for the genesis block, skipping connection of its transactions // (its coinbase is unspendable) - if (block.GetHash() == consensus.hashGenesisBlock) { + if (block.GetHash() == Params().GetConsensus(0).hashGenesisBlock) { if (!fJustCheck) view.SetBestBlock(pindex->GetBlockHash()); return true; @@ -2933,7 +2933,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo static bool CheckIndexAgainstCheckpoint(const CBlockIndex* pindexPrev, CValidationState& state, const CChainParams& chainparams, const uint256& hash) { - if (*pindexPrev->phashBlock == chainparams.GetConsensus(pindexPrev->nHeight + 1).hashGenesisBlock) + if (*pindexPrev->phashBlock == chainparams.GetConsensus(0).hashGenesisBlock) return true; int nHeight = pindexPrev->nHeight+1;