Skip to content

Commit

Permalink
fix clang build
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Sep 18, 2024
1 parent 08c13dd commit a7cac6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/state/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,20 @@ StateDiff State::build_diff(evmc_revision rev)
{
// TODO: This must be done even for just_created because destructed may pre-date
// just_created. Add test.
d2.deleted_accounts.push_back(addr);
d2.deleted_accounts.emplace_back(addr);
continue;
}
if (acc.erase_if_empty && rev >= EVMC_SPURIOUS_DRAGON && acc.is_empty())
{
if (!acc.just_created) // Don't report just created accounts
d2.deleted_accounts.push_back(addr);
d2.deleted_accounts.emplace_back(addr);
continue;
}

// Unconditionally report nonce and balance as modified.
auto& a = d2.modified_accounts.emplace_back(addr, acc.nonce, acc.balance);
// TODO(clang): In old Clang emplace_back without Account doesn't compile.
auto& a =
d2.modified_accounts.emplace_back(StateDiff::Account{addr, acc.nonce, acc.balance});
// FIXME: Add a test: send ETH via SELFDESTRUCT to account with code.
if (acc.just_created && !acc._code.empty())
a.code = acc._code;
Expand Down

0 comments on commit a7cac6e

Please sign in to comment.