|
@ -471,6 +471,11 @@ private: |
|
|
|
|
|
|
|
|
void doFarm(MinerType _m, string const& _remote, unsigned _recheckPeriod) |
|
|
void doFarm(MinerType _m, string const& _remote, unsigned _recheckPeriod) |
|
|
{ |
|
|
{ |
|
|
|
|
|
map<string, GenericFarm<EthashProofOfWork>::SealerDescriptor> sealers; |
|
|
|
|
|
sealers["cpu"] = GenericFarm<EthashProofOfWork>::SealerDescriptor{&EthashCPUMiner::instances, [](GenericMiner<EthashProofOfWork>::ConstructionInfo ci){ return new EthashCPUMiner(ci); }}; |
|
|
|
|
|
#if ETH_ETHASHCL |
|
|
|
|
|
sealers["opencl"] = GenericFarm<EthashProofOfWork>::SealerDescriptor{&EthashGPUMiner::instances, [](GenericMiner<EthashProofOfWork>::ConstructionInfo ci){ return new EthashGPUMiner(ci); }}; |
|
|
|
|
|
#endif |
|
|
(void)_m; |
|
|
(void)_m; |
|
|
(void)_remote; |
|
|
(void)_remote; |
|
|
(void)_recheckPeriod; |
|
|
(void)_recheckPeriod; |
|
@ -479,6 +484,7 @@ private: |
|
|
|
|
|
|
|
|
Farm rpc(client); |
|
|
Farm rpc(client); |
|
|
GenericFarm<EthashProofOfWork> f; |
|
|
GenericFarm<EthashProofOfWork> f; |
|
|
|
|
|
f.setSealers(sealers); |
|
|
if (_m == MinerType::CPU) |
|
|
if (_m == MinerType::CPU) |
|
|
f.start("cpu"); |
|
|
f.start("cpu"); |
|
|
else if (_m == MinerType::GPU) |
|
|
else if (_m == MinerType::GPU) |
|
|