Skip to content

Commit

Permalink
opt
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyShi22 committed Jan 29, 2024
1 parent bcecdfe commit 313b6c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions bcos-executor/src/executive/BillingTransactionExecutive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ CallParameters::UniquePtr BillingTransactionExecutive::start(CallParameters::Uni
<< LOG_KV("gasUsed", gasUsed) << LOG_KV("gasPrice", gasPrice)
<< LOG_KV("origin", currentSenderAddr);
auto subBalanceRet = callPrecompiled(std::move(callParam4AccountPre));
/* leave this code for future use
auto subBalanceRet = externalRequest(shared_from_this(), ref(callParam4AccountPre->data),
currentSenderAddr, callParam4AccountPre->senderAddress,
callParam4AccountPre->receiveAddress, false, false,
message->gas, true);
*/
if (subBalanceRet->type == CallParameters::REVERT)
{
message->type = subBalanceRet->type;
Expand Down
7 changes: 1 addition & 6 deletions bcos-executor/src/executive/TransactionExecutive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,7 @@ bool TransactionExecutive::transferBalance(std::string_view origin, std::string_
<< LOG_KV("addAccount", receiver)
<< LOG_KV("receiveAddress", ACCOUNT_ADDRESS) << LOG_KV("value", value)
<< LOG_KV("gas", gas);
if (isPrecompiled(std::string(receiver)))
{
EXECUTIVE_LOG(DEBUG) << LOG_BADGE("Execute")
<< "transferBalance, receiverAddress is precompiled address";
return false;
}

// first subAccountBalance, then addAccountBalance
// sender = sender - value
auto codec = CodecWrapper(m_blockContext.hashHandler(), m_blockContext.isWasm());
Expand Down

0 comments on commit 313b6c1

Please sign in to comment.