Skip to content

Commit

Permalink
update feature name
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyShi22 committed Nov 3, 2023
1 parent 0aa679d commit 871921c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bcos-executor/src/vm/DelegateHostContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ h256 DelegateHostContext::codeHash()

std::string_view DelegateHostContext::myAddress() const
{
if (this->features().get(ledger::Features::Flag::bugfix_evm))
if (this->features().get(ledger::Features::Flag::bugfix_evm_create2_delegatecall_staticcall_codecopy))
{
return m_thisAddress;
}
Expand Down
2 changes: 1 addition & 1 deletion bcos-executor/src/vm/EVMHostInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ size_t copyCode(evmc_host_context* _context, const evmc_address* _addr, size_t _
uint8_t* _bufferData, size_t _bufferSize)
{
auto& hostContext = static_cast<HostContext&>(*_context);
if (hostContext.features().get(ledger::Features::Flag::bugfix_evm))
if (hostContext.features().get(ledger::Features::Flag::bugfix_evm_create2_delegatecall_staticcall_codecopy))
{
auto addr = fromEvmC(*_addr);
bytes const& code = hostContext.codeAt(addr);
Expand Down
4 changes: 2 additions & 2 deletions bcos-executor/src/vm/HostContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ evmc_result HostContext::externalRequest(const evmc_message* _msg)
{
case EVMC_CREATE2:
request->createSalt = fromEvmC(_msg->create2_salt);
if (features().get(ledger::Features::Flag::bugfix_evm))
if (features().get(ledger::Features::Flag::bugfix_evm_create2_delegatecall_staticcall_codecopy))
{
request->data.assign(_msg->input_data, _msg->input_data + _msg->input_size);
request->create = true;
Expand Down Expand Up @@ -218,7 +218,7 @@ evmc_result HostContext::externalRequest(const evmc_message* _msg)

request->staticCall = m_callParameters->staticCall;

if (features().get(ledger::Features::Flag::bugfix_evm))
if (features().get(ledger::Features::Flag::bugfix_evm_create2_delegatecall_staticcall_codecopy))
{
// EVM STATICCALL opcode support
if (_msg->flags & EVMC_STATIC)
Expand Down
4 changes: 2 additions & 2 deletions bcos-framework/bcos-framework/ledger/Features.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Features
{
bugfix_revert, // https://github.com/FISCO-BCOS/FISCO-BCOS/issues/3629
bugfix_statestorage_hash,
bugfix_evm,
bugfix_evm_create2_delegatecall_staticcall_codecopy,
feature_dmc2serial,
};

Expand Down Expand Up @@ -83,7 +83,7 @@ class Features
if (version >= protocol::BlockVersion::V3_2_4_VERSION)
{
set(Flag::bugfix_statestorage_hash);
set(Flag::bugfix_evm);
set(Flag::bugfix_evm_create2_delegatecall_staticcall_codecopy);
}
}

Expand Down
2 changes: 1 addition & 1 deletion bcos-framework/test/unittests/interfaces/FeaturesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(feature)
BOOST_CHECK_EQUAL(keys.size(), 3);
BOOST_CHECK_EQUAL(keys[0], "bugfix_revert");
BOOST_CHECK_EQUAL(keys[1], "bugfix_statestorage_hash");
BOOST_CHECK_EQUAL(keys[2], "bugfix_evm");
BOOST_CHECK_EQUAL(keys[2], "bugfix_evm_create2_delegatecall_staticcall_codecopy");
BOOST_CHECK_EQUAL(keys[3], "feature_dmc2serial");
}

Expand Down

0 comments on commit 871921c

Please sign in to comment.