Skip to content

Commit

Permalink
Merge branch 'release-3.6.0' into release-3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyShi22 authored Jan 22, 2024
2 parents 59c0bbf + f5748e9 commit 3a15396
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ install(
)
# copy pre-commit to git hook

if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit AND EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks)
file(COPY ${CMAKE_SOURCE_DIR}/tools/.ci/pre-commit DESTINATION ${CMAKE_SOURCE_DIR}/.git/hooks
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
7 changes: 6 additions & 1 deletion bcos-executor/src/executor/TransactionExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2596,7 +2596,12 @@ std::unique_ptr<CallParameters> TransactionExecutor::createCallParameters(
{
// padding zero
callParameters->origin = std::string(addressSize - input.origin().size(), '0');
callParameters->senderAddress = std::string(addressSize - input.from().size(), '0');
// NOTE: if wasm and use dmc static call external call, should not padding zero, because it
// is contract address
if (!(m_isWasm && input.origin() != input.from())) [[unlikely]]
{
callParameters->senderAddress = std::string(addressSize - input.from().size(), '0');
}
}
callParameters->origin += input.origin();
callParameters->senderAddress += input.from();
Expand Down

0 comments on commit 3a15396

Please sign in to comment.