@@ -32,39 +32,35 @@ namespace dev
32
32
namespace eth
33
33
{
34
34
35
- // / Proof of work definition for Ethash.
36
- struct EthashProofOfWork
35
+ struct Solution
37
36
{
38
- struct Solution
39
- {
40
- Nonce nonce;
41
- h256 mixHash;
42
- };
37
+ Nonce nonce;
38
+ h256 mixHash;
39
+ };
43
40
44
- struct Result
45
- {
46
- h256 value;
47
- h256 mixHash;
48
- };
41
+ struct Result
42
+ {
43
+ h256 value;
44
+ h256 mixHash;
45
+ };
49
46
50
- struct WorkPackage
51
- {
52
- WorkPackage () = default ;
53
- WorkPackage (BlockHeader const & _bh) :
54
- boundary (_bh.boundary()),
55
- headerHash (_bh.hashWithout()),
56
- seedHash (_bh.seedHash())
57
- { }
58
- void reset () { headerHash = h256 (); }
59
- operator bool () const { return headerHash != h256 (); }
60
-
61
- h256 boundary;
62
- h256 headerHash; // /< When h256() means "pause until notified a new work package is available".
63
- h256 seedHash;
64
-
65
- uint64_t startNonce = 0 ;
66
- int exSizeBits = -1 ;
67
- };
47
+ struct WorkPackage
48
+ {
49
+ WorkPackage () = default ;
50
+ WorkPackage (BlockHeader const & _bh) :
51
+ boundary (_bh.boundary()),
52
+ headerHash (_bh.hashWithout()),
53
+ seedHash (_bh.seedHash())
54
+ { }
55
+ void reset () { headerHash = h256 (); }
56
+ operator bool () const { return headerHash != h256 (); }
57
+
58
+ h256 boundary;
59
+ h256 headerHash; // /< When h256() means "pause until notified a new work package is available".
60
+ h256 seedHash;
61
+
62
+ uint64_t startNonce = 0 ;
63
+ int exSizeBits = -1 ;
68
64
};
69
65
70
66
class EthashAux
@@ -77,7 +73,7 @@ class EthashAux
77
73
LightAllocation (h256 const & _seedHash);
78
74
~LightAllocation ();
79
75
bytesConstRef data () const ;
80
- EthashProofOfWork:: Result compute (h256 const & _headerHash, Nonce const & _nonce) const ;
76
+ Result compute (h256 const & _headerHash, Nonce const & _nonce) const ;
81
77
ethash_light_t light;
82
78
uint64_t size;
83
79
};
@@ -89,7 +85,7 @@ class EthashAux
89
85
90
86
static LightType light (h256 const & _seedHash);
91
87
92
- static EthashProofOfWork:: Result eval (h256 const & _seedHash, h256 const & _headerHash, Nonce const & _nonce) noexcept ;
88
+ static Result eval (h256 const & _seedHash, h256 const & _headerHash, Nonce const & _nonce) noexcept ;
93
89
94
90
private:
95
91
EthashAux () = default ;
0 commit comments