![]() |
Fabcoin Core
0.16.2
P2P Digital Currency
|
A collective of Miners. 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 () |
Private Member Functions | |
| void | resetTimer () |
Private Attributes | |
| SharedMutex | x_minerWork |
| std::vector< std::shared_ptr< Miner > > | m_miners |
| WorkPackage | m_work |
| std::atomic< bool > | m_isMining = {false} |
| SharedMutex | x_progress |
| WorkingProgress | m_progress |
| std::chrono::steady_clock::time_point | m_lastStart |
| SolutionFound | m_onSolutionFound |
| std::map< std::string, SealerDescriptor > | m_sealers |
| std::string | m_lastSealer |
A collective of Miners.
Miners ask for work, then submit proofs
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.
|
inlineprivate |
|
inline |
|
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.
|
private |
Definition at line 191 of file GenericFarm.h.
|
private |
Definition at line 200 of file GenericFarm.h.
|
private |
Definition at line 195 of file GenericFarm.h.
|
private |
Definition at line 188 of file GenericFarm.h.
|
private |
Definition at line 197 of file GenericFarm.h.
|
mutableprivate |
Definition at line 194 of file GenericFarm.h.
|
private |
Definition at line 199 of file GenericFarm.h.
|
private |
Definition at line 189 of file GenericFarm.h.
|
mutableprivate |
Definition at line 187 of file GenericFarm.h.
|
mutableprivate |
Definition at line 193 of file GenericFarm.h.
1.8.11