MCPcopy Create free account
hub / github.com/ethstorage/es-node / initHash

Function initHash

ethstorage/miner/algorithm.go:35–41  ·  view source on GitHub ↗
(miner common.Address, mixedHash common.Hash, nonce uint64)

Source from the content-addressed store, hash-verified

33}
34
35func initHash(miner common.Address, mixedHash common.Hash, nonce uint64) common.Hash {
36 return crypto.Keccak256Hash(
37 common.BytesToHash(miner.Bytes()).Bytes(),
38 mixedHash.Bytes(),
39 common.BigToHash(new(big.Int).SetUint64(nonce)).Bytes(),
40 )
41}
42
43func expectedDiff(interval uint64, difficulty, cutoff, diffAdjDivisor, minDiff *big.Int) *big.Int {
44 diff := new(big.Int).Set(difficulty)

Callers 1

mineTaskMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected