test: Properly clear storage dirty flag

Clear storage dirty flag between transactions in EVMHost. The EIP-2200
dirty flag should be persisted only in a single transaction.
This commit is contained in:
Paweł Bylica
2022-11-08 18:13:17 +01:00
committed by Paweł Bylica
parent d472c94ff6
commit c4b6f5f00b
26 changed files with 132 additions and 106 deletions
+5 -2
View File
@@ -174,10 +174,13 @@ void EVMHost::newTransactionFrame()
{
// Clear EIP-2929 account access indicator
recorded_account_accesses.clear();
// Clear EIP-2929 storage access indicator
for (auto& [address, account]: accounts)
for (auto& [slot, value]: account.storage)
value.access_status = EVMC_ACCESS_COLD;
{
value.access_status = EVMC_ACCESS_COLD; // Clear EIP-2929 storage access indicator
value.dirty = false; // Clear EIP-2200 dirty slot flag
}
// Process selfdestruct list
for (auto& [address, _]: recorded_selfdestructs)
accounts.erase(address);