Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit 4139bce

Browse files
committedMay 10, 2018
Use keccak from ethash
1 parent 0c8478b commit 4139bce

File tree

6 files changed

+7
-269
lines changed

6 files changed

+7
-269
lines changed
 

‎ethminer/MinerAux.h

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include <boost/optional.hpp>
3535

3636
#include <libethcore/Exceptions.h>
37-
#include <libdevcore/SHA3.h>
3837
#include <libethcore/EthashAux.h>
3938
#include <libethcore/Farm.h>
4039
#include <ethminer-buildinfo.h>

‎libdevcore/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ find_package(Threads)
66
add_library(devcore ${SOURCES} ${HEADERS})
77
target_link_libraries(devcore PUBLIC Boost::boost Boost::system)
88
target_link_libraries(devcore PRIVATE Threads::Threads)
9+

‎libdevcore/SHA3.cpp

-216
This file was deleted.

‎libdevcore/SHA3.h

-48
This file was deleted.

‎libethcore/BlockHeader.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
/// Licensed under GNU General Public License, Version 3. See the LICENSE file.
44

55
#include "BlockHeader.h"
6-
#include "EthashAux.h"
6+
77
#include <libdevcore/Common.h>
8-
#include <libdevcore/Log.h>
98
#include <libdevcore/RLP.h>
109

10+
#include <ethash/keccak.hpp>
11+
1112
namespace dev
1213
{
1314
namespace eth
@@ -25,7 +26,9 @@ h256 const& BlockHeader::hashWithout() const
2526
{
2627
RLPStream s(BasicFields);
2728
streamRLPFields(s);
28-
m_hashWithout = sha3(s.out());
29+
const bytes& rlp = s.out();
30+
auto hash = ethash::keccak256(rlp.data(), rlp.size());
31+
m_hashWithout = h256{hash.bytes, h256::ConstructFromPointer};
2932
}
3033
return m_hashWithout;
3134
}

‎libethcore/BlockHeader.h

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <libdevcore/Common.h>
1010
#include <libdevcore/RLP.h>
11-
#include <libdevcore/SHA3.h>
1211

1312
namespace dev
1413
{

0 commit comments

Comments
 (0)
This repository has been archived.