MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / HashBlock

Function HashBlock

pow/cpuminer/miner.go:59–61  ·  view source on GitHub ↗

HashBlock calculate the hash of MiningBlock.

(data []byte, nonce Uint256)

Source from the content-addressed store, hash-verified

57
58// HashBlock calculate the hash of MiningBlock.
59func 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

Callers 4

TestCPUMiner_HashBlockFunction · 0.85
ComputeBlockNonceMethod · 0.85

Calls 2

THashHFunction · 0.92
BytesMethod · 0.45

Tested by 3

TestCPUMiner_HashBlockFunction · 0.68