user24556: 
I'm getting this error in regtest mode after setgenerate RPC:

ERROR: CheckProofOfWork() : hash doesn't match nBits

After looking for error text in src I found a match in pow.cpp (obviously standing for proof of work) with following extract from code: 
// Check proof of work matches claimed amount
if (hash > bnTarget)
     return error("CheckProofOfWork() : hash doesn't match nBits");

Does it mean there's a target in regtest?If yes, isn't it contradicting to difficulty being 0?

user208: The regtest difficulty is not 0. It is around 0.0000000005 initially (corresponding to 1 hash in 2 being valid), and retargets the same way that the main network does, every 2016 blocks.
The fact that you see this error is a bug though, which will probably be fixed in Bitcoin Core 0.11.

24556: <p><br/></p>

<p>I'm getting this error in <strong>regtest</strong> mode after <code>setgenerate</code> RPC:<br/></p>

<blockquote>
  <p>ERROR: CheckProofOfWork() : hash doesn't match nBits<br/></p>
</blockquote>

<p>After looking for error text in src I found a match in <code>pow.cpp</code> (obviously standing for proof of work) with following extract from code: <br/></p>

<pre><code>// Check proof of work matches claimed amount
if (hash &gt; bnTarget)
     return error("CheckProofOfWork() : hash doesn't match nBits");
</code></pre>

<p>Does it mean there's a target in regtest?If yes, isn't it contradicting to difficulty being 0?</p>
 208: <p>The regtest difficulty is not 0. It is around 0.0000000005 initially (corresponding to 1 hash in 2 being valid), and retargets the same way that the main network does, every 2016 blocks.</p>

<p>The fact that you see this error is a bug though, which will probably be fixed in Bitcoin Core 0.11.</p>
