MCPcopy Create free account
hub / github.com/SmartPool/smartpool-client / AcceptSolution

Method AcceptSolution

ethereum/work.go:34–44  ·  view source on GitHub ↗
(sol smartpool.Solution)

Source from the content-addressed store, hash-verified

32}
33
34func (w *Work) AcceptSolution(sol smartpool.Solution) smartpool.Share {
35 solution := sol.(*Solution)
36 s := &Share{
37 blockHeader: w.blockHeader,
38 nonce: solution.Nonce,
39 mixDigest: solution.MixDigest,
40 shareDifficulty: w.ShareDifficulty(),
41 }
42 s.SolutionState = ethash.Instance.SolutionState(s, w.ShareDifficulty())
43 return s
44}
45
46func (w *Work) PoWHash() common.Hash {
47 return common.HexToHash(w.powHash)

Callers

nothing calls this directly

Implementers 2

testWorkprotocol/test_work.go
Workethereum/work.go

Calls 2

ShareDifficultyMethod · 0.95
SolutionStateMethod · 0.80

Tested by

no test coverage detected