Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5659 from ethereum/aleth-interpreter-deps
Browse files Browse the repository at this point in the history
Remove devcore from aleth-interpreter dependencies
  • Loading branch information
chfast authored Jul 9, 2019
2 parents 70a8928 + b9dac11 commit e1f8a1f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 12 additions & 2 deletions libaleth-interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ set(
VMConfig.h
VMOpt.cpp
)

set(
dependencies
aleth-buildinfo
ethash::ethash
evmc::evmc
evmc::instructions
Boost::boost
)

add_library(aleth-interpreter STATIC ${sources})
target_link_libraries(aleth-interpreter PRIVATE devcore aleth-buildinfo evmc::evmc evmc::instructions)
target_link_libraries(aleth-interpreter PRIVATE ${dependencies})

if(ALETH_INTERPRETER_SHARED)
# Build aleth-interpreter additionally as a shared library to include it in the package
add_library(aleth-interpreter-shared SHARED ${sources})
target_link_libraries(aleth-interpreter-shared PRIVATE devcore aleth-buildinfo evmc::evmc evmc::instructions)
target_link_libraries(aleth-interpreter-shared PRIVATE ${dependencies})
set_target_properties(aleth-interpreter-shared PROPERTIES OUTPUT_NAME aleth-interpreter)
install(TARGETS aleth-interpreter-shared EXPORT alethTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand Down
4 changes: 3 additions & 1 deletion libaleth-interpreter/VM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ void VM::interpretCases()

uint64_t inOff = (uint64_t)m_SP[0];
uint64_t inSize = (uint64_t)m_SP[1];
m_SPP[0] = (u256)sha3(bytesConstRef(m_mem.data() + inOff, inSize));

const auto h = ethash::keccak256(m_mem.data() + inOff, inSize);
m_SPP[0] = static_cast<u256>(h256{h.bytes, h256::ConstructFromPointer});
}
NEXT

Expand Down

0 comments on commit e1f8a1f

Please sign in to comment.