user64266: Where is the nonce incremented in Bitcoin source code?
I found where the extra nonce is incremented, but not the regular nonce?

user52573: Line 132 in src/mining.cpp in the generateBlocks method.
while (nMaxTries > 0 && pblock->nNonce < nInnerLoopCount && !CheckProofOfWork(pblock->GetHash(), pblock->nBits, Params().GetConsensus())) {
    ++pblock->nNonce;
    --nMaxTries;
}

Update: Given @MeshCollider's answer I guess this is now only relevant on the regtest network.

64266: <p>Where is the nonce incremented in Bitcoin source code?
I found where the extra nonce is incremented, but not the regular nonce?</p>
 52573: <p>Line 132 in src/mining.cpp in the generateBlocks method.</p>

<pre><code>while (nMaxTries &gt; 0 &amp;&amp; pblock-&gt;nNonce &lt; nInnerLoopCount &amp;&amp; !CheckProofOfWork(pblock-&gt;GetHash(), pblock-&gt;nBits, Params().GetConsensus())) {
    ++pblock-&gt;nNonce;
    --nMaxTries;
}
</code></pre>

<p><strong>Update</strong>: Given @MeshCollider's answer I guess this is now only relevant on the regtest network.</p>
