Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit 5c34123

Browse files
committedMay 30, 2017
Remove ethcore/Common.h header
1 parent d5618a4 commit 5c34123

File tree

6 files changed

+18
-71
lines changed

6 files changed

+18
-71
lines changed
 

‎libethcore/BlockInfo.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <libdevcore/Common.h>
2323
#include <libdevcore/Log.h>
2424
#include <libdevcore/RLP.h>
25-
#include <libethcore/Common.h>
2625
#include "EthashAux.h"
2726
#include "Exceptions.h"
2827
#include "BlockInfo.h"

‎libethcore/BlockInfo.h

+10-1
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,23 @@
2424
#include <libdevcore/Common.h>
2525
#include <libdevcore/RLP.h>
2626
#include <libdevcore/SHA3.h>
27-
#include "Common.h"
2827
#include "Exceptions.h"
2928

3029
namespace dev
3130
{
3231
namespace eth
3332
{
3433

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+
3544
enum IncludeProof
3645
{
3746
WithoutProof = 0,

‎libethcore/Common.h

-66
This file was deleted.

‎libethcore/Exceptions.h

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#pragma once
2323

2424
#include <libdevcore/Exceptions.h>
25-
#include "Common.h"
2625

2726
namespace dev
2827
{

‎libethcore/Farm.h

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <atomic>
2727
#include <libdevcore/Common.h>
2828
#include <libdevcore/Worker.h>
29-
#include <libethcore/Common.h>
3029
#include <libethcore/Miner.h>
3130
#include <libethcore/BlockInfo.h>
3231

‎libethcore/Miner.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <libdevcore/Common.h>
3030
#include <libdevcore/Log.h>
3131
#include <libdevcore/Worker.h>
32-
#include <libethcore/Common.h>
3332
#include "EthashAux.h"
3433

3534
#define MINER_WAIT_STATE_UNKNOWN 0
@@ -68,6 +67,14 @@ enum class MinerType
6867
Mixed
6968
};
7069

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+
7178
inline std::ostream& operator<<(std::ostream& _out, WorkingProgress _p)
7279
{
7380
float mh = _p.rate() / 1000000.0f;

0 commit comments

Comments
 (0)