 |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
Go to the documentation of this file.
37 _out << _p.
rate() <<
" H/s = " << _p.
hashes <<
" hashes / " << (double(_p.
ms) / 1000) <<
" s";
89 bool const old_exists = !!m_work;
101 else if (!_work && old_exists)
103 Guard l(x_hashCount);
111 unsigned index()
const {
return m_index; }
156 uint64_t m_hashCount = 0;
157 mutable Mutex x_hashCount;
160 mutable Mutex x_work;
typename PoW::WorkPackage WorkPackage
Class for hosting one or more Miners.
A miner - a member and adoptee of the Farm.
std::lock_guard< std::mutex > Guard
WorkPackage const & work() const
Describes the progress of a mining operation.
virtual ~GenericFarmFace()
uint64_t hashes
Total number of hashes computed.
#define DEV_TIMED_ABOVE(S, MS)
bool submitProof(Solution const &_s)
Notes that the Miner found a solution.
typename PoW::Solution Solution
typename PoW::Solution Solution
uint64_t hashCount() const
virtual void kickOff()=0
Begin working on a given work package, discarding any previous work.
typename PoW::WorkPackage WorkPackage
void accumulateHashes(unsigned _n)
virtual bool submitProof(Solution const &_p, Miner *_finder)=0
Called from a Miner to note a WorkPackage has a solution.
void setWork(WorkPackage const &_work=WorkPackage())
std::pair< FarmFace *, unsigned > ConstructionInfo
GenericMiner(ConstructionInfo const &_ci)
uint64_t ms
Total number of milliseconds of mining thus far.
std::ostream & operator<<(std::ostream &_out, BlockHeader const &_bi)
GenericFarmFace< PoW > FarmFace
virtual void pause()=0
No work left to be done. Pause until told to kickOff().