Bugfix: ConnectBlock: In case the genesis block gets in with fJustCheck, behave correctly

This commit is contained in:
Luke Dashjr 2014-12-31 03:28:05 +00:00
parent 228d238525
commit 1b178a7f96

View file

@ -1616,6 +1616,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
// Special case for the genesis block, skipping connection of its transactions // Special case for the genesis block, skipping connection of its transactions
// (its coinbase is unspendable) // (its coinbase is unspendable)
if (block.GetHash() == Params().HashGenesisBlock()) { if (block.GetHash() == Params().HashGenesisBlock()) {
if (!fJustCheck)
view.SetBestBlock(pindex->GetBlockHash()); view.SetBestBlock(pindex->GetBlockHash());
return true; return true;
} }