Skip to content

Commit 1d281da

Browse files
committed
Merge bitcoin/bitcoin#32095: doc: clarify that testnet min-difficulty is not optional
288481a 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: https://github.com/bitcoin/bitcoin/blob/e568c1dd134e0318c46113cb7dfc23b40e2829e8/src/validation.cpp#L4212-L4215 ACKs for top commit: fjahr: ACK 288481a kevkevinpal: ACK [288481a](bitcoin/bitcoin@288481a) Tree-SHA512: 17d426301f386fa5810cceedfdb20a3523ab3ac2f17257ca7a525edd869fa409b150eff4cc258b27adecd0ded1c18ff48a9998fc9caed2faa461e410d4c5a884
2 parents a0d737c + 288481a commit 1d281da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
2323
{
2424
// Special difficulty rule for testnet:
2525
// If the new block's timestamp is more than 2* 10 minutes
26-
// then allow mining of a min-difficulty block.
26+
// then it MUST be a min-difficulty block.
2727
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*2)
2828
return nProofOfWorkLimit;
2929
else

0 commit comments

Comments
 (0)