![]() |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
A collective of Miners. Miners ask for work, then submit proofs @threadsafe. More...
#include <GenericFarm.h>
Classes | |
| struct | SealerDescriptor |
Public Types | |
| using | WorkPackage = typename PoW::WorkPackage |
| using | Solution = typename PoW::Solution |
| using | Miner = GenericMiner< PoW > |
| using | SolutionFound = std::function< bool(Solution const &)> |
Public Types inherited from dev::eth::GenericFarmFace< PoW > | |
| using | WorkPackage = typename PoW::WorkPackage |
| using | Solution = typename PoW::Solution |
| using | Miner = GenericMiner< PoW > |
Public Member Functions | |
| ~GenericFarm () | |
| void | setWork (WorkPackage const &_wp) |
| Sets the current mining mission. More... | |
| void | setSealers (std::map< std::string, SealerDescriptor > const &_sealers) |
| bool | start (std::string const &_sealer) |
| Start a number of miners. More... | |
| void | stop () |
| Stop all mining activities. More... | |
| bool | isMining () const |
| WorkingProgress const & | miningProgress () const |
| Get information on the progress of mining this work package. More... | |
| void | resetMiningProgress () |
| Reset the mining progess counter. More... | |
| void | onSolutionFound (SolutionFound const &_handler) |
| Provides a valid header based upon that received previously with setWork(). More... | |
| WorkPackage | work () const |
| bool | submitProof (Solution const &_s, Miner *_m) override |
| Called from a Miner to note a WorkPackage has a solution. More... | |
Public Member Functions inherited from dev::eth::GenericFarmFace< PoW > | |
| virtual | ~GenericFarmFace () |
A collective of Miners. Miners ask for work, then submit proofs @threadsafe.
Definition at line 45 of file GenericFarm.h.
| using dev::eth::GenericFarm< PoW >::Miner = GenericMiner<PoW> |
Definition at line 50 of file GenericFarm.h.
| using dev::eth::GenericFarm< PoW >::Solution = typename PoW::Solution |
Definition at line 49 of file GenericFarm.h.
| using dev::eth::GenericFarm< PoW >::SolutionFound = std::function<bool(Solution const&)> |
Definition at line 149 of file GenericFarm.h.
| using dev::eth::GenericFarm< PoW >::WorkPackage = typename PoW::WorkPackage |
Definition at line 48 of file GenericFarm.h.
|
inline |
Definition at line 58 of file GenericFarm.h.
|
inline |
Definition at line 115 of file GenericFarm.h.
|
inline |
Get information on the progress of mining this work package.
Definition at line 124 of file GenericFarm.h.
|
inline |
Provides a valid header based upon that received previously with setWork().
| _bi | The now-valid header. |
Definition at line 156 of file GenericFarm.h.
|
inline |
Reset the mining progess counter.
Definition at line 141 of file GenericFarm.h.
|
inline |
Definition at line 78 of file GenericFarm.h.
|
inline |
Sets the current mining mission.
| _wp | The work package we wish to be mining. |
Definition at line 67 of file GenericFarm.h.
|
inline |
Start a number of miners.
Definition at line 83 of file GenericFarm.h.
|
inline |
Stop all mining activities.
Definition at line 107 of file GenericFarm.h.
|
inlineoverridevirtual |
Called from a Miner to note a WorkPackage has a solution.
| _p | The solution. |
| _wp | The WorkPackage that the Solution is for. |
Implements dev::eth::GenericFarmFace< PoW >.
Definition at line 166 of file GenericFarm.h.
|
inline |
Definition at line 158 of file GenericFarm.h.