Skip to content

Commit

Permalink
Use keccak from ethash
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed May 10, 2018
1 parent 0c8478b commit 4139bce
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 269 deletions.
1 change: 0 additions & 1 deletion ethminer/MinerAux.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <boost/optional.hpp>

#include <libethcore/Exceptions.h>
#include <libdevcore/SHA3.h>
#include <libethcore/EthashAux.h>
#include <libethcore/Farm.h>
#include <ethminer-buildinfo.h>
Expand Down
1 change: 1 addition & 0 deletions libdevcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ find_package(Threads)
add_library(devcore ${SOURCES} ${HEADERS})
target_link_libraries(devcore PUBLIC Boost::boost Boost::system)
target_link_libraries(devcore PRIVATE Threads::Threads)

216 changes: 0 additions & 216 deletions libdevcore/SHA3.cpp

This file was deleted.

48 changes: 0 additions & 48 deletions libdevcore/SHA3.h

This file was deleted.

9 changes: 6 additions & 3 deletions libethcore/BlockHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
/// Licensed under GNU General Public License, Version 3. See the LICENSE file.

#include "BlockHeader.h"
#include "EthashAux.h"

#include <libdevcore/Common.h>
#include <libdevcore/Log.h>
#include <libdevcore/RLP.h>

#include <ethash/keccak.hpp>

namespace dev
{
namespace eth
Expand All @@ -25,7 +26,9 @@ h256 const& BlockHeader::hashWithout() const
{
RLPStream s(BasicFields);
streamRLPFields(s);
m_hashWithout = sha3(s.out());
const bytes& rlp = s.out();
auto hash = ethash::keccak256(rlp.data(), rlp.size());
m_hashWithout = h256{hash.bytes, h256::ConstructFromPointer};
}
return m_hashWithout;
}
Expand Down
1 change: 0 additions & 1 deletion libethcore/BlockHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <libdevcore/Common.h>
#include <libdevcore/RLP.h>
#include <libdevcore/SHA3.h>

namespace dev
{
Expand Down

0 comments on commit 4139bce

Please sign in to comment.