Skip to content

Commit ad77fd7

Browse files
committed
EVMHost: Rename newlyCreatedAccounts to m_newlyCreatedAccounts
1 parent be9db7b commit ad77fd7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/EVMHost.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ void EVMHost::newTransactionFrame()
198198
}
199199
// Process selfdestruct list
200200
for (auto& [address, _]: recorded_selfdestructs)
201-
if (m_evmVersion < langutil::EVMVersion::cancun() || newlyCreatedAccounts.count(address))
201+
if (m_evmVersion < langutil::EVMVersion::cancun() || m_newlyCreatedAccounts.count(address))
202202
// EIP-6780: If SELFDESTRUCT is executed in a transaction different from the one
203203
// in which it was created, we do NOT record it or clear any data.
204204
// Otherwise, the previous behavior (pre-Cancun) is maintained.
205205
accounts.erase(address);
206-
newlyCreatedAccounts.clear();
206+
m_newlyCreatedAccounts.clear();
207207
m_totalCodeDepositGas = 0;
208208
recorded_selfdestructs.clear();
209209
}
@@ -358,7 +358,7 @@ evmc::Result EVMHost::call(evmc_message const& _message) noexcept
358358
auto& destination = accounts[message.recipient];
359359
if (message.kind == EVMC_CREATE || message.kind == EVMC_CREATE2)
360360
// Mark account as created if it is a CREATE or CREATE2 call
361-
newlyCreatedAccounts.emplace(message.recipient);
361+
m_newlyCreatedAccounts.emplace(message.recipient);
362362

363363
if (value != 0 && message.kind != EVMC_DELEGATECALL && message.kind != EVMC_CALLCODE)
364364
{

test/EVMHost.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ class EVMHost: public evmc::MockedHost
131131
static evmc::Result resultWithGas(int64_t gas_limit, int64_t gas_required, bytes const& _data) noexcept;
132132
static evmc::Result resultWithFailure() noexcept;
133133

134-
/// Store the accounts that have been created in the current transaction.
135-
std::unordered_set<evmc::address> newlyCreatedAccounts;
136-
137134
evmc::VM& m_vm;
138135
/// EVM version requested by the testing tool
139136
langutil::EVMVersion m_evmVersion;
140137
/// EVM version requested from EVMC (matches the above)
141138
evmc_revision m_evmRevision;
142139

140+
/// Store the accounts that have been created in the current transaction.
141+
std::unordered_set<evmc::address> m_newlyCreatedAccounts;
142+
143143
/// The part of the total cost of the current transaction that paid for the code deposits.
144144
/// I.e. GAS_CODE_DEPOSIT times the total size of deployed code of all newly created contracts,
145145
/// including the current contract itself if it was a creation transaction.

0 commit comments

Comments
 (0)