mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-22 14:35:07 +02:00
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:
commit
1d281daf86
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user