Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state: Only mark touch of empty accounts #785

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/state/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Account& State::get_or_insert(const address& addr, Account account)

Account& State::touch(const address& addr)
{
auto& acc = get_or_insert(addr);
if (!acc.erase_if_empty)
auto& acc = get_or_insert(addr, {.erase_if_empty = true});
if (!acc.erase_if_empty && acc.is_empty())
{
acc.erase_if_empty = true;
m_journal.emplace_back(JournalTouched{addr});
Expand Down