Skip to content

Commit

Permalink
Removing duplicate code and using cleanup_election function which era…
Browse files Browse the repository at this point in the history
…ses from roots and updates vacancy already.
  • Loading branch information
clemahieu committed May 25, 2021
1 parent 316dcfa commit e1d7025
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nano/node/active_transactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,7 @@ void nano::active_transactions::erase_oldest ()
if (!roots.empty ())
{
auto item = roots.get<tag_random_access> ().front ();
cleanup_election (lock, item.election->cleanup_info ());
roots.get<tag_root> ().erase (item.election->qualified_root);
vacancy_update ();
cleanup_election (lock, *item.election);
}
}

Expand Down

0 comments on commit e1d7025

Please sign in to comment.