Browse Source

Remove unused EthashSealEngine class

cl-refactor
Paweł Bylica 8 years ago
parent
commit
cddc1b8401
No known key found for this signature in database GPG Key ID: 7A0C037434FE77EF
  1. 13
      libethcore/CMakeLists.txt
  2. 1
      libethcore/Ethash.h
  3. 54
      libethcore/EthashSealEngine.cpp
  4. 48
      libethcore/EthashSealEngine.h

13
libethcore/CMakeLists.txt

@ -3,16 +3,13 @@ file(GLOB HEADERS "*.h")
include_directories(BEFORE ..)
if (ETHASHCUDA)
include_directories(${CUDA_INCLUDE_DIRS})
endif ()
add_library(ethcore ${SOURCES} ${HEADERS})
target_link_libraries(ethcore ethash devcore)
if (ETHASHCL)
if(ETHASHCL)
target_link_libraries(ethcore ethash-cl)
endif ()
if (ETHASHCUDA)
endif()
if(ETHASHCUDA)
target_include_directories(ethcore PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(ethcore ethash-cuda)
endif ()
endif()

1
libethcore/Ethash.h

@ -53,7 +53,6 @@ public:
class BlockHeaderRaw: public BlockInfo
{
friend class EthashSealEngine;
public:
h256 const& seedHash() const;

54
libethcore/EthashSealEngine.cpp

@ -1,54 +0,0 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file EthashSealEngine.cpp
* @author Gav Wood <i@gavwood.com>
* @date 2014
*
* Determines the PoW algorithm.
*/
#include "EthashSealEngine.h"
#include "EthashGPUMiner.h"
#include "EthashCUDAMiner.h"
using namespace std;
using namespace dev;
using namespace eth;
EthashSealEngine::EthashSealEngine()
{
map<string, GenericFarm<EthashProofOfWork>::SealerDescriptor> sealers;
#if ETH_ETHASHCL
sealers["opencl"] = GenericFarm<EthashProofOfWork>::SealerDescriptor{&EthashGPUMiner::instances, [](GenericMiner<EthashProofOfWork>::ConstructionInfo ci){ return new EthashGPUMiner(ci); }};
#endif
#if ETH_ETHASHCUDA
sealers["cuda"] = GenericFarm<EthashProofOfWork>::SealerDescriptor{ &EthashCUDAMiner::instances, [](GenericMiner<EthashProofOfWork>::ConstructionInfo ci){ return new EthashCUDAMiner(ci); } };
#endif
m_farm.setSealers(sealers);
}
strings EthashSealEngine::sealers() const
{
return {
"cpu"
#if ETH_ETHASHCL
, "opencl"
#endif
#if ETH_ETHASHCUDA
, "cuda"
#endif
};
}

48
libethcore/EthashSealEngine.h

@ -1,48 +0,0 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file EthashSealEngine.h
* @author Gav Wood <i@gavwood.com>
* @date 2014
*
* Determines the PoW algorithm.
*/
#pragma once
#include "Ethash.h"
#include "EthashAux.h"
namespace dev
{
namespace eth
{
class EthashSealEngine
{
friend class Ethash;
public:
EthashSealEngine();
strings sealers() const;
private:
eth::GenericFarm<EthashProofOfWork> m_farm;
};
}
}
Loading…
Cancel
Save