where in the source code is the the proof of work checking the blockheader hash and nonce?
where in the source code is the the proof of work checking the blockheader hash and nonce?
Where in the source code do we check whether
hash(blockheader*nonce) < Difficulty
In fact, the line I found is as follows: https://github.com/bitcoin/bitcoin/blob/v0.17.0.1/src/pow.cpp#L87
My problem with this is 3-fold
a) this is not the code that miners use to perform the check; it probably is the validation on node-side ?
b) here the "hash" refers to what exactly ?
c) why is this value tested against nTarget ? rather than Difficulty ?
d) this check is usually advertised in media as "<"less rather than "<=" less than equal. But seeing how this line is coded , it means HASH<= nTarget is OK.
https://ift.tt/2NhiSZA
Comments
Post a Comment