aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2018-01-08 20:23:41 +0000
committerRoss Nicoll <[email protected]>2018-09-19 21:09:16 +0100
commit493f02ba2a51dcf9a97a6a0a4cb8733ef4c097d3 (patch)
tree3f3d073b4daaa27e0dae8eadd98fa5d0ba6af0a4 /src/validation.cpp
parent[auxpow] Guarantee backward compatibility on getauxblock (diff)
downloaddiscoin-493f02ba2a51dcf9a97a6a0a4cb8733ef4c097d3.tar.xz
discoin-493f02ba2a51dcf9a97a6a0a4cb8733ef4c097d3.zip
Always use parameters at block 0 to get genesis block hash (#1416)
This doesn't actually change behaviour, but stylistically is more correct.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 13f98cdaa..240edafda 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;
@@ -2934,7 +2934,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;