HashBlock calculate the hash of MiningBlock.
(data []byte, nonce Uint256)
| 57 | |
| 58 | // HashBlock calculate the hash of MiningBlock. |
| 59 | func HashBlock(data []byte, nonce Uint256) hash.Hash { |
| 60 | return hash.THashH(append(data, nonce.Bytes()...)) |
| 61 | } |
| 62 | |
| 63 | // ComputeBlockNonce find nonce make HashBlock() match the MiningBlock Difficulty from the startNonce |
| 64 | // if interrupted or stopped highest difficulty nonce will be sent to the NonceCh |