File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -198,12 +198,12 @@ void EVMHost::newTransactionFrame()
198
198
}
199
199
// Process selfdestruct list
200
200
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))
202
202
// EIP-6780: If SELFDESTRUCT is executed in a transaction different from the one
203
203
// in which it was created, we do NOT record it or clear any data.
204
204
// Otherwise, the previous behavior (pre-Cancun) is maintained.
205
205
accounts.erase (address);
206
- newlyCreatedAccounts .clear ();
206
+ m_newlyCreatedAccounts .clear ();
207
207
m_totalCodeDepositGas = 0 ;
208
208
recorded_selfdestructs.clear ();
209
209
}
@@ -358,7 +358,7 @@ evmc::Result EVMHost::call(evmc_message const& _message) noexcept
358
358
auto & destination = accounts[message.recipient ];
359
359
if (message.kind == EVMC_CREATE || message.kind == EVMC_CREATE2)
360
360
// Mark account as created if it is a CREATE or CREATE2 call
361
- newlyCreatedAccounts .emplace (message.recipient );
361
+ m_newlyCreatedAccounts .emplace (message.recipient );
362
362
363
363
if (value != 0 && message.kind != EVMC_DELEGATECALL && message.kind != EVMC_CALLCODE)
364
364
{
Original file line number Diff line number Diff line change @@ -131,15 +131,15 @@ class EVMHost: public evmc::MockedHost
131
131
static evmc::Result resultWithGas (int64_t gas_limit, int64_t gas_required, bytes const & _data) noexcept ;
132
132
static evmc::Result resultWithFailure () noexcept ;
133
133
134
- // / Store the accounts that have been created in the current transaction.
135
- std::unordered_set<evmc::address> newlyCreatedAccounts;
136
-
137
134
evmc::VM& m_vm;
138
135
// / EVM version requested by the testing tool
139
136
langutil::EVMVersion m_evmVersion;
140
137
// / EVM version requested from EVMC (matches the above)
141
138
evmc_revision m_evmRevision;
142
139
140
+ // / Store the accounts that have been created in the current transaction.
141
+ std::unordered_set<evmc::address> m_newlyCreatedAccounts;
142
+
143
143
// / The part of the total cost of the current transaction that paid for the code deposits.
144
144
// / I.e. GAS_CODE_DEPOSIT times the total size of deployed code of all newly created contracts,
145
145
// / including the current contract itself if it was a creation transaction.
You can’t perform that action at this time.
0 commit comments