Fabcoin Core  0.16.2
P2P Digital Currency
EthashProofOfWork.cpp
Go to the documentation of this file.
1 /*
2  This file is part of cpp-ethereum.
3 
4  cpp-ethereum is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  cpp-ethereum is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
16 */
24 #include "EthashProofOfWork.h"
25 #include "Ethash.h"
26 using namespace std;
27 using namespace chrono;
28 using namespace dev;
29 using namespace eth;
30 
31 const unsigned EthashProofOfWork::defaultLocalWorkSize = 64;
32 const unsigned EthashProofOfWork::defaultGlobalWorkSizeMultiplier = 4096; // * CL_DEFAULT_LOCAL_WORK_SIZE
33 const unsigned EthashProofOfWork::defaultMSPerBatch = 0;
34 const EthashProofOfWork::WorkPackage EthashProofOfWork::NullWorkPackage = EthashProofOfWork::WorkPackage();
35 
36 EthashProofOfWork::WorkPackage::WorkPackage(BlockHeader const& _bh):
37  boundary(Ethash::boundary(_bh)),
38  headerHash(_bh.hash(WithoutSeal)),
39  seedHash(Ethash::seedHash(_bh))
40 {}
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
Encapsulation of a block header.
Definition: BlockHeader.h:95
std::hash for asio::adress
Definition: Common.h:323