Skip to content

Commit

Permalink
<fix>(executor): fix wasm static call external call in dmc bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay committed Jan 18, 2024
1 parent ca14134 commit 33c9ffc
Showing 1 changed file with 6 additions and 1 deletion.
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 33c9ffc

Please sign in to comment.