1557 | @@ -1558,7 +1558,8 @@ bool CBlock::ConnectBlock(CBlockIndex* pindex, CCoinsViewCache &view, bool fJust
1558 | // Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the
1559 | // two in the chain that violate it. This prevents exploiting the issue against nodes in their
1560 | // initial block download.
1561 | - bool fEnforceBIP30 = !((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) ||
I don't really like the fact that the hash in CBlockIndex::phashBlock is optional. We have a GetBlockHash()... why doesn't it just calculate the hash if it's not available?
Hm. In the case of a CreateNewBlock JustCheck it would just be pointless computation on an operation which is supposed to be fast. Effectively in this case we don't know— and can't know— the hash yet. Perhaps generally GetBlockHash should do that though. At least in this case it only gets called for those two heights.
Agree, in this case, it's an optimization not needing to calculate the hash.