Ethereum  PoC-8
The C++ Implementation of Ethereum
dev::eth::GenericFarmFace< PoW > Class Template Referenceabstract

Class for hosting one or more Miners. More...

#include <GenericMiner.h>

Inheritance diagram for dev::eth::GenericFarmFace< PoW >:
dev::eth::GenericFarm< PoW >

Public Types

using WorkPackage = typename PoW::WorkPackage
 
using Solution = typename PoW::Solution
 
using Miner = GenericMiner< PoW >
 

Public Member Functions

virtual ~GenericFarmFace ()
 
virtual bool submitProof (Solution const &_p, Miner *_finder)=0
 Called from a Miner to note a WorkPackage has a solution. More...
 

Detailed Description

template<class PoW>
class dev::eth::GenericFarmFace< PoW >

Class for hosting one or more Miners.

Warning
Must be implemented in a threadsafe manner since it will be called from multiple miner threads.

Definition at line 48 of file GenericMiner.h.

Member Typedef Documentation

◆ Miner

template<class PoW >
using dev::eth::GenericFarmFace< PoW >::Miner = GenericMiner<PoW>

Definition at line 53 of file GenericMiner.h.

◆ Solution

template<class PoW >
using dev::eth::GenericFarmFace< PoW >::Solution = typename PoW::Solution

Definition at line 52 of file GenericMiner.h.

◆ WorkPackage

template<class PoW >
using dev::eth::GenericFarmFace< PoW >::WorkPackage = typename PoW::WorkPackage

Definition at line 51 of file GenericMiner.h.

Constructor & Destructor Documentation

◆ ~GenericFarmFace()

template<class PoW >
virtual dev::eth::GenericFarmFace< PoW >::~GenericFarmFace ( )
inlinevirtual

Definition at line 55 of file GenericMiner.h.

Member Function Documentation

◆ submitProof()

template<class PoW >
virtual bool dev::eth::GenericFarmFace< PoW >::submitProof ( Solution const &  _p,
Miner _finder 
)
pure virtual

Called from a Miner to note a WorkPackage has a solution.

Parameters
_pThe solution.
_wpThe WorkPackage that the Solution is for; this will be reset if the work is accepted.
_finderThe miner that found it.
Returns
true iff the solution was good (implying that mining should be .

Implemented in dev::eth::GenericFarm< PoW >.


The documentation for this class was generated from the following file: