Merge bitcoin/bitcoin#23882: doc: testnet3 was not reset and is doing BIP30 checks again

fa1a51cbc1 doc: testnet3 was not reset and is doing BIP30 checks again (MarcoFalke)

Pull request description:

ACKs for top commit:
  theStack:
    ACK fa1a51cbc1

Tree-SHA512: 793eccda583a3edb056b142c36a09a5c867f61d90b96e15e6643417d62eb651eb2f3429c5f245bdb062d18ab9bb05b5048c0888aa5a492cb7bb21a2f3f52324e
This commit is contained in:
fanquake 2022-01-02 08:14:27 +08:00
commit 6535772510
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -2006,9 +2006,8 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
// another edge case to deal with.
// testnet3 has no blocks before the BIP34 height with indicated heights
// post BIP34 before approximately height 486,000,000 and presumably will
// be reset before it reaches block 1,983,702 and starts doing unnecessary
// BIP30 checking again.
// post BIP34 before approximately height 486,000,000. After block
// 1,983,702 testnet3 starts doing unnecessary BIP30 checking again.
assert(pindex->pprev);
CBlockIndex* pindexBIP34height = pindex->pprev->GetAncestor(m_params.GetConsensus().BIP34Height);
//Only continue to enforce if we're below BIP34 activation height or the block hash at that height doesn't correspond.