This repository was archived by the owner on Apr 24, 2022. It is now read-only.
File tree 6 files changed +18
-71
lines changed
6 files changed +18
-71
lines changed Original file line number Diff line number Diff line change 22
22
#include < libdevcore/Common.h>
23
23
#include < libdevcore/Log.h>
24
24
#include < libdevcore/RLP.h>
25
- #include < libethcore/Common.h>
26
25
#include " EthashAux.h"
27
26
#include " Exceptions.h"
28
27
#include " BlockInfo.h"
Original file line number Diff line number Diff line change 24
24
#include < libdevcore/Common.h>
25
25
#include < libdevcore/RLP.h>
26
26
#include < libdevcore/SHA3.h>
27
- #include " Common.h"
28
27
#include " Exceptions.h"
29
28
30
29
namespace dev
31
30
{
32
31
namespace eth
33
32
{
34
33
34
+ // / An Ethereum address: 20 bytes.
35
+ using Address = h160;
36
+
37
+ // / The log bloom's size (2048-bit).
38
+ using LogBloom = h2048;
39
+
40
+ using Nonce = h64;
41
+
42
+ using BlockNumber = unsigned ;
43
+
35
44
enum IncludeProof
36
45
{
37
46
WithoutProof = 0 ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
22
#pragma once
23
23
24
24
#include < libdevcore/Exceptions.h>
25
- #include " Common.h"
26
25
27
26
namespace dev
28
27
{
Original file line number Diff line number Diff line change 26
26
#include < atomic>
27
27
#include < libdevcore/Common.h>
28
28
#include < libdevcore/Worker.h>
29
- #include < libethcore/Common.h>
30
29
#include < libethcore/Miner.h>
31
30
#include < libethcore/BlockInfo.h>
32
31
Original file line number Diff line number Diff line change 29
29
#include < libdevcore/Common.h>
30
30
#include < libdevcore/Log.h>
31
31
#include < libdevcore/Worker.h>
32
- #include < libethcore/Common.h>
33
32
#include " EthashAux.h"
34
33
35
34
#define MINER_WAIT_STATE_UNKNOWN 0
@@ -68,6 +67,14 @@ enum class MinerType
68
67
Mixed
69
68
};
70
69
70
+ // / Describes the progress of a mining operation.
71
+ struct WorkingProgress
72
+ {
73
+ uint64_t hashes = 0 ; // /< Total number of hashes computed.
74
+ uint64_t ms = 0 ; // /< Total number of milliseconds of mining thus far.
75
+ uint64_t rate () const { return ms == 0 ? 0 : hashes * 1000 / ms; }
76
+ };
77
+
71
78
inline std::ostream& operator <<(std::ostream& _out, WorkingProgress _p)
72
79
{
73
80
float mh = _p.rate () / 1000000 .0f ;
You can’t perform that action at this time.
0 commit comments