Merge bitcoin/bitcoin#32095: doc: clarify that testnet min-difficulty is not optional

288481aabd77b90876489e39403b6eab9d4ae74d doc: clarify that testnet min-difficulty is not optional (Sjors Provoost)

Pull request description:

  When 20 minutes have gone by on testnet3 or testnet4, the next block `MUST` have difficulty 1. I've seen people be confused about this several times now in recent months. It doesn't help that the code comment is wrong. So fixing that.

  The reason is that `nBits` must match exactly:

  e568c1dd13/src/validation.cpp (L4212-L4215)

ACKs for top commit:
  fjahr:
    ACK 288481aabd77b90876489e39403b6eab9d4ae74d
  kevkevinpal:
    ACK [288481a](288481aabd)

Tree-SHA512: 17d426301f386fa5810cceedfdb20a3523ab3ac2f17257ca7a525edd869fa409b150eff4cc258b27adecd0ded1c18ff48a9998fc9caed2faa461e410d4c5a884
This commit is contained in:
Ryan Ofsky 2025-03-24 16:56:47 -04:00
commit 1d281daf86
No known key found for this signature in database
GPG Key ID: 46800E30FC748A66

View File

@ -23,7 +23,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
{
// Special difficulty rule for testnet:
// If the new block's timestamp is more than 2* 10 minutes
// then allow mining of a min-difficulty block.
// then it MUST be a min-difficulty block.
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*2)
return nProofOfWorkLimit;
else