mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-02-18 19:28:48 +00:00
Always use parameters at block 0 to get genesis block hash (#1416)
This doesn't actually change behaviour, but stylistically is more correct.
This commit is contained in:
parent
c4c08ffb12
commit
f2cbd73c7c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user