<p>No person decides. This block of C++ code decides:</p>

<pre><code>bool CheckProofOfWork(uint256 hash, unsigned int nBits)
{
    CBigNum bnTarget;
    bnTarget.SetCompact(nBits);

    // Check range
    if (bnTarget &lt;= 0 || bnTarget &gt; bnProofOfWorkLimit)
        return error("CheckProofOfWork() : nBits below minimum work");

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

    return true;
}
</code></pre>

<p>For people who can't read C++: It looks at the target hash field, then unpacks it, and compares it to the actual hash.</p>

CC BY-SA 3.0
2013-03-30T16:06:53.507Z
where did you get that piece of code from?
user2084795
CC BY-SA 3.0
2013-03-30T17:32:21.367Z
@user2084795 [main.cpp line 1155](https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L1155)
Nick ODell
CC BY-SA 3.0
2013-03-25T17:21:23.560Z
2013-03-25T17:21:23.560Z
Nick ODell
<p>Yes, shares are there to provide to the pool operator that you are working with the pool. Because you are actually hashing data and providing valid hashes of the data the pool sent, it proves you are working with them, meaning you deserve some of the sweet BTC reward when someone finds the actual answer. </p>

CC BY-SA 3.0
2013-03-25T16:24:27.260Z
2013-03-25T16:24:27.260Z
KDecker
<p>If a share does not lead to a valid block they would not require to be sent to the server?
Or is the only purpose of the share sent to the server to show that the client did some work?</p>

<mining-pool-shares>
Who decides whether a submitted share leads to a valid block or not?
user2084795
# Who decides whether a submitted share leads to a valid block or not?

(Asked by: username_0 on 2013-03-25)

If a share does not lead to a valid block they would not require to be sent to the server?
Or is the only purpose of the share sent to the server to show that the client did some work?

**Tags:** mining-pool-shares


---

## 2 answers

### Answer by username_1 on 2013-03-25. Score: 1 | Accepted answer

No person decides. This block of C++ code decides:
bool CheckProofOfWork(uint256 hash, unsigned int nBits)
{
    CBigNum bnTarget;
    bnTarget.SetCompact(nBits);

    // Check range
    if (bnTarget <= 0 || bnTarget > bnProofOfWorkLimit)
        return error("CheckProofOfWork() : nBits below minimum work");

    // Check proof of work matches claimed amount
    if (hash > bnTarget.getuint256())
        return error("CheckProofOfWork() : hash doesn't match nBits");

    return true;
}

For people who can't read C++: It looks at the target hash field, then unpacks it, and compares it to the actual hash.

> **Comments:**
> **username_0**: where did you get that piece of code from?  
> **username_1**: @username_0 [main.cpp line 1155](https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L1155)  

---

### Answer by username_2 on 2013-03-25. Score: 1

Yes, shares are there to provide to the pool operator that you are working with the pool. Because you are actually hashing data and providing valid hashes of the data the pool sent, it proves you are working with them, meaning you deserve some of the sweet BTC reward when someone finds the actual answer.


---

