Browse Source

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

0.13
Luke Dashjr 10 years ago
parent
commit
1b178a7f96
  1. 3
      src/main.cpp

3
src/main.cpp

@ -1616,7 +1616,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin @@ -1616,7 +1616,8 @@ 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() == Params().HashGenesisBlock()) {
view.SetBestBlock(pindex->GetBlockHash());
if (!fJustCheck)
view.SetBestBlock(pindex->GetBlockHash());
return true;
}

Loading…
Cancel
Save